analogdevicesinc / TMC-API

TRINAMIC's IC API
MIT License
188 stars 83 forks source link

Some definitions are missing in TMC5272_HW_Abstraction.h compared to the data sheet #57

Open chrislro2019 opened 5 months ago

chrislro2019 commented 5 months ago

I did not do a full review, but I stumbled over missing definitions in the header file compared to the data sheet. The header file should contain for all registers all field definitions as defined in the data sheet.

E.g. https://github.com/analogdevicesinc/TMC-API/blob/f276b3e94894494009a1c44e3eb21512ad0ab320/tmc/ic/TMC5272/TMC5272_HW_Abstraction.h#L520-L526

lacks the definition for the fields:

In addition - at least for the TMC5272 - the header file does not define field values as defined in the "Decode" column in the data sheet. This would be very helpful to have all of them in the header file as there are really a lot of them. E.g.:

#define TMC5272_ENCMODE_POL_B_NEGATIVE (0)
#define TMC5272_ENCMODE_POL_B_POSITIVE (1)
chrislro2019 commented 5 months ago

Also a goody would be the list of all register RESET values as defines.