You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
So currently this results in unpredictable interrupt-to-line mappings.
The text was updated successfully, but these errors were encountered:
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
changed the title
select_interrupt_line_1 on stm32g4 is incorrect
select_interrupt_line_1 on stm32g4 selects wrong interrupts
Sep 5, 2024
The current implementation of
select_interrupt_line_1
copies the Interrupts bitflags directly to theFDCAN_ILS
register. This works on STM32H7 because this register's bits have the same mapping as other interrupt registers likeFDCAN_IE
.On STM32G4 the bits are groups of interrupts, instead:
![Screenshof STM32G4 reference manual](https://private-user-images.githubusercontent.com/205573/364661185-6c082eef-e862-4990-b0af-117943a82f0e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2NzY4MzcsIm5iZiI6MTczOTY3NjUzNywicGF0aCI6Ii8yMDU1NzMvMzY0NjYxMTg1LTZjMDgyZWVmLWU4NjItNDk5MC1iMGFmLTExNzk0M2E4MmYwZS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjE2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxNlQwMzI4NTdaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT02ZmVjZmEzZGU5ODVkZjE2NjY5N2Q1YjQwZTdmOTBhZTQ2OWU4NmM3NzU1NDNmNzUwOTIzMDBmOGIxOTdiMjU3JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.amX0RsTa3pURKXcmXMsQRR3V9rMz_fEPIGFtnVB9fBE)
So currently this results in unpredictable interrupt-to-line mappings.
The text was updated successfully, but these errors were encountered: