Skip to main content
Graduate
June 12, 2023
Question

Whats the process to write the data in flash memory by using STM Cube programmer ?

  • June 12, 2023
  • 6 replies
  • 2959 views

I'm working on Custom boot loader based on Openbootloader by ST, existing example is based on STM32G0/G4 series but I'm using STM32F417 and there are losts of differences in terms of internal flash memory architecture(G0 to F4 series) and HAL/LL library also,

I made losts of changes in existing example to make it run on STM32F4, while using

STM cube programmer showing read flash successful and write flash also, but there is no data on desire location, The issue is bad configuration of Options byte and write protection,

So I want to know what's the process to write the data in flash?

Thanks

    This topic has been closed for replies.

    6 replies

    Super User
    June 12, 2023

    It's not clear if you're trying to upload a program (since you mention HAL/LL and code updates), or if you're trying to edit individual data bytes. Can you clarify?

    Screenshots of the errors or what you expect vs what you see would help.

    Graduate II
    June 13, 2023

    Well the memory of the Flash in the F4 is more complex than others.

    Are you using the UART protocol, or something else?

    vchau.2Author
    Graduate
    June 13, 2023

    Yes, I'm using UART protocol


    _legacyfs_online_stmicro_images_0693W00000dDf2PQAS.png

    See above attached image every thing is fine (read/ write)

    but if i varify the memory its showing fffffffffffffffffffff

    ​as show in below image


    _legacyfs_online_stmicro_images_0693W00000dDf4GQAS.png

    Super User
    June 13, 2023

    Click "Read" again so it updates the memory. Your log should have "Time elapsed during the read operation is: ..." as its last line. If you look at the log, the last read operation was prior to the download.

    vchau.2Author
    Graduate
    June 21, 2023

    I was trying to write flash by Openbootloader, Now everything is working,

    STM32F417 working on openbootloader,

    Issue was "Not able to write as Dword, change to word" to make it run.

     

    thanks to all for your help

    Explorer II
    December 7, 2023

    Hi @vchau.2 

    I have a custom board with STM32G474RCT6 controller. And I want to develop a FDCAN bootloader for my project.

    What are the changes I should make for my controller based on the Open Bootloader code provided by ST. Can you share me the major changes you made in your project.

    vchau.2Author
    Graduate
    December 26, 2023

    Hi Nishanth,

    I used open bootloader for UART only but it also support CAN protocol to update the firmware, You need to configure some changes on existing open bootloader wisely, reset of the things Bootloader handle its self