-
Notifications
You must be signed in to change notification settings - Fork 243
Fix bit shift in AHB1 register for CRC enable/reset/sleep-mode bits, STM32L4x3.svd patch #517
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
Conversation
Discovered when attempting to enable CRC hardware module. ```rust let crc_guy = dp.CRC.constrain(&mut rcc.ahb1); ``` CRC output would be 0. Found with debugger that the enable bit was not being set in rcc.ahb1 power enable register. Other peripherals in the register (DMA1/2) could be enabled and the remaining bits in the register are not writable. Tested against the following code provided by STM32CubeMX, in which the CRC module is functional. Source: CMSIS/Device/ST/STM32L4xx/Include/stm32l433xx.h ``` ``` - STM32L43xxx... Reference Manual RM0394 Rev 4. Sections 6.4.9, 6.4.15, 6.4.21 - Bug Verified/Fixed/Tested on STM32L433 (Nucleo-L433RC-P)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this PR! The changes look good, just need to fix a syntax problem in the YAML (below).
Co-authored-by: Adam Greig <adam@adamgreig.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, looks like my indentation wasn't quite right in that suggested change - the new content had been indented with 4 spaces per tab, so when we combined the sections they were indented underneath the existing APB1ENR1 register and that's why the CI failed.
Co-authored-by: Adam Greig <adam@adamgreig.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, looks good!
bors merge
Discovered when attempting to enable CRC hardware module.
CRC output would be 0. Found with debugger that the enable bit was not
being set in rcc.ahb1 power enable register. Other peripherals in the
register (DMA1/2) could be enabled and the remaining bits in the
register are not writable.
Tested against the following code provided by STM32CubeMX, in which the
CRC module is functional.
Sources
CMSIS/Device/ST/STM32L4xx/Include/stm32l433xx.h
STM32L43xxx... Reference Manual RM0394 Rev 4. Sections 6.4.9, 6.4.15, 6.4.21
Bug Verified/Fixed/Tested on STM32L433 (Nucleo-L433RC-P)