micropython / stm32lib

STM32 Cube library - CMSIS and HAL for F4, F7 and L4 microcontrollers
63 stars 71 forks source link

stm32lib/CMSIS/STM32F4xx/Include/stm32f413xx.h: Add RCC_CSR_BORRSTF #4

Closed chrismas9 closed 5 years ago

chrismas9 commented 5 years ago

RCC_CSR_BORRSTF is defined in the STM32F413 Reference Manual but missing from the header file.

dpgeorge commented 5 years ago

Thanks it looks good. It could be that a newer version of the Cube HAL includes this, but adding it this way is a lot easier than updating the HAL, and doesn't prevent updating it later.

chrismas9 commented 5 years ago

I think I used the wrong branch. Should this go to work-F0-1.9.0+F4-1.16.0+F7-1.7.0+H7-1.2.0+L4-1.8.1, not Vendor? Not sure how to fix it.

dpgeorge commented 5 years ago

It should go to the latest work branch. Vendor is used only for pulling in upstream from ST.

dpgeorge commented 5 years ago

Merged in ed056258d4aedba622f6d07629d38809bd0d40b3

dpgeorge commented 5 years ago

@chrismas9 note that this won't be reflected in the MicroPython repository until the submodule is updated there, which can be done once the F413 is shown to be working.

chrismas9 commented 5 years ago

@dpgeorge, the F413 port is complete and working, however I won't release it until I finish testing. RCC_CSR_BORRSTF is only used to define RCC_SR_BORRSTF which is never used for the F4 (only F0). This patch allows upy to compile, but will never be functionally tested.

I have found a BOR issue. Whilst testing the hardware and from subsequent code review it appears BOR (brown out reset) is not enabled and the STM32 is only reset when the supply drops below 1.7V. This could lead to unreliable operation from 1.7 to 2.7V because the Flash latency values used are only valid above 2.7V. I will raise a separate issue to discuss this.