stm32f4xx.h FLASH_ definitions

This forum is dedicated to feedback, discussions about ongoing or future developments, ideas and suggestions regarding the ChibiOS projects are welcome. This forum is NOT for support.
Post Reply
trepidacious
Posts: 58
Joined: Mon Jan 21, 2013 3:36 pm
Been thanked: 1 time

stm32f4xx.h FLASH_ definitions

Post by trepidacious »

Hi,

I'm just looking at porting some flash writing code from using the ST peripheral library to using stm32f4xx.h in ChibiOS. I noticed that the stm32f4xx.h seems to be missing FLASH_KEY1 and FLASH_KEY2 defines, although stm32f30x.h has them.

FLASH_CR_SNB_4 is currently defined as the same as FLASH_CR_SNB_3 (0x00000040), I assume this bit is for 2MiB flash so should probably be 0x00000080 (btw I can't find the ST flash programming manual for e.g. the 427 to check this, I just have the F40x/F41x one...)

I also noticed that the ST flash programming library calls FLASH->SR bit 1 "OPERR" but stm32f4xx.h has "FLASH_SR_SOP", it seems like this bit name is pretty commonly used in other STM32 code/libraries as well, but I couldn't work out why ;)

Ben.
Post Reply