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

select_interrupt_line_1 on stm32g4 selects wrong interrupts #51

Open
projectgus opened this issue Sep 5, 2024 · 1 comment
Open

select_interrupt_line_1 on stm32g4 selects wrong interrupts #51

projectgus opened this issue Sep 5, 2024 · 1 comment

Comments

@projectgus
Copy link

projectgus commented Sep 5, 2024

The current implementation of select_interrupt_line_1 copies the Interrupts bitflags directly to the FDCAN_ILS register. This works on STM32H7 because this register's bits have the same mapping as other interrupt registers like FDCAN_IE.

On STM32G4 the bits are groups of interrupts, instead:
Screenshof STM32G4 reference manual

So currently this results in unpredictable interrupt-to-line mappings.

@projectgus
Copy link
Author

projectgus commented Sep 5, 2024

I might have time to submit a fix for this, my only question is whether the public interface needs to be the same across both families of chips. If it can be a different function signature for G4/etc then it seems relatively straightforward.

If they need to be compatible then maybe not, although a G4 compatible function could be implemented to work on H7 (it would just be less flexible).

@projectgus projectgus changed the title select_interrupt_line_1 on stm32g4 is incorrect select_interrupt_line_1 on stm32g4 selects wrong interrupts Sep 5, 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