[SOLVED] Bytewise size flash download with JLinkGDBServer

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [SOLVED] Bytewise size flash download with JLinkGDBServer

    Hello,

    I have a board with a STM32F446 cpu and where VDD is 1.8V. The related datasheet says that when VDD is between 1.7V and 2.1V, the flash can only be programmed bytewise. I tried to download an image to flash inside gdb with the "load" command but it does not work, it seems that JLinkGDBServer is using a transfer size greater than a byte. Is there a way to configure GDBServer in order to get a bytewise transfer when I run the "load" command? If not is there another alternative to have bytewise flash downloading?

    Thanks,

    Best Regards,
    Fabien
  • Hi Fabien,


    flash programming is not influenced by J-Link GDBServer, but is done by the J-Link DLL, which downloads a device/flash specific program to RAM, which then programs the flash.
    I will check with my colleges if we have any special handling for the STM32F446 in case VDD is 1.7V - 2.1V.

    Best regards,
    Niklas
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Hello Fabien,

    The SEGGER flash algorithm for the ST STM32F4 series, already takes care of the target voltage. See code below:
    if (VTarget > 2700) {
    AccessWidth = 4;
    } else if (VTarget > 2400) {
    AccessWidth = 2;
    } else {
    AccessWidth = 1;
    }
    [...]
    FLASH->CR = ((AccessWidth >> 1) << 8 );
    [...]

    No special setup needs to be performed on your side. If VTref is 1.8V, the algorithm will use the x8 transfer size.


    Best regards
    Erik
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.