AnsweredAssumed Answered

STM32F4: How to program BOR/ option bytes?

Question asked by bil.til on Apr 16, 2012
Latest reply on Apr 16, 2012 by Clive One
In STM32F4, TRM, Chapter 4 "PWR" it says under 4.2.2 "BOR...", there it says "VBOR is configured through device option bytes." It would be very nice, if you could spend a link there to the description of the device option bytes. (Searching the document for "device option bytes" leads to no result. These "option bytes" seem to be a bit mystical - only 2.3.3 "Flash memory" gives a hint of "16 option bytes"..., but not easy to find their description)

Anybody knows, where I can find the description of these Option Bytes?

... sorry, just found it myself, it is well described in the additional "Programming manual PM0081 STM32F40xx and STM32F41xx Flash programming manual" (but it would be nice of course, if the ref. manual would give a link to this programming manual) (further it would be VERY nice, if STM32F4xx.h would have any predefined constants for programming this - as I think BOR is very important, nearly ANY user will be interested in this, and it would be very helpful, if in the STM32F4xx_DSP_StdPeriph_Lib_Examples\Flash there would be an example how to program the BOR level - I find one for the write protection, but I really would appreciate to have an example for BOR directly from STM, as for sure this is a quite sensitive topic).

... meanwhile I saw, that in STM32F4xx_DSP_StdPeriph_Lib there is quite good support through the file STM32F4xx_Flash.c/h. Just one big question: Why there they use the adresses
#define OPTCR_BYTE0_ADDRESS         ((uint32_t)0x40023C14)
#define OPTCR_BYTE1_ADDRESS         ((uint32_t)0x40023C15)
#define OPTCR_BYTE2_ADDRESS         ((uint32_t)0x40023C16)

But in the flash programming manual it says, that these option bytes should be at flash address 0x1FFF C000, 0x1FFF C004 and 0x1FFF C008. Can anybody resolve this contradiction?

Outcomes