This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Setting STM32F4 BOR option bytes

How do I set the BOR option bytes for an STM32F4?
There is an example STM32F10xOPT.s in Blinky that has a Keil wizard with it.
I cannot find any other ...OPT.s in my installation. Is there somewhere I can download a STM32F4xOPT.s and if I include it in the project will the wizard include BOR settings?

Konrad

  • Configuring STM32F Option bytes (including BOR) requires programming certain bytes at specific addresses.

    This can be achieved by:

    1. Adding an appropriate configuration file to the project
    - right-click on a Group in uVision Project window and chose “Add New Item to Group …”
    - click on “User Code Template”
    - expand “Device”
    - select “Flash Option Bytes”
    - click “Add”

    2. Configure the desired features in the file “STM32F4xxx_OPT.s” (Configuration Wizard can be used)

    3. Build the project

    4. Add the Flash programming algorithm for the Option bytes
    Project – Options for Target … - Utilities: click on Settings
    Add Algorithm STM324xxxx Flash Options

    5. Flash the image

    The mentioned Blinky example – target STM32f407 OPT is configured in this way and can be used as a reference.