Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some RegisterField definitions are wrong in TMC5272_HW_Abstraction.h, contains itself, must use SHIFT #55

Open
chrislro2019 opened this issue Apr 12, 2024 · 0 comments

Comments

@chrislro2019
Copy link

chrislro2019 commented Apr 12, 2024

https://github.com/analogdevicesinc/TMC-API/blob/f276b3e94894494009a1c44e3eb21512ad0ab320/tmc/ic/TMC5272/TMC5272_HW_Abstraction.h#L109C118-L109C152
https://github.com/analogdevicesinc/TMC-API/blob/f276b3e94894494009a1c44e3eb21512ad0ab320/tmc/ic/TMC5272/TMC5272_HW_Abstraction.h#L439C1-L439C54

Must use FIELD definition, not its own name

// wrongly uses its own definition
#define TMC5272_GCONF_M0_DIAG0_ERROR_FIELD                    ((RegisterField) { TMC5272_GCONF_M0_DIAG0_ERROR_MASK,  TMC5272_GCONF_M0_DIAG0_ERROR_FIELD,  TMC5272_GCONF, false })
// instead use SHIFT
#define TMC5272_GCONF_M0_DIAG0_ERROR_FIELD                    ((RegisterField) { TMC5272_GCONF_M0_DIAG0_ERROR_MASK,  TMC5272_GCONF_M0_DIAG0_ERROR_SHIFT,  TMC5272_GCONF, false })

Same for TMC5272_RAMP_STAT_STATUS_LATCH_L_FIELD

@chrislro2019 chrislro2019 changed the title Some RegisterField definitions are wrong in TMC5272_HW_Abstraction.h, contains itself, must use FIELD Some RegisterField definitions are wrong in TMC5272_HW_Abstraction.h, contains itself, must use SHIFT Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant