Skip to main content
Ravi S
Associate II
March 10, 2022
Question

Hi Guys, I am working on SPC584B-DISP Board.In this board i need bootloader option so that i am try to use example SPC584Bxx_RLA Bootloader Test Application for Discovery 2 .In this example download code from serial UART .

  • March 10, 2022
  • 40 replies
  • 14056 views

In this I can able to download bin file from UART next step jump to app in this step not working if any one have idea please help .......

Thanks advance ...

    This topic has been closed for replies.

    40 replies

    ODOUV.1
    ST Employee
    March 15, 2022

    Hello,

    your problem 2 is known:

    0693W00000KcgkWQAR.pngSo you have to use option Copy in RAM

    (because 0xFC0000 and 0x1000000 are in same partition0)

    Then you enter into problem 1 ...

    you write binary in flash at 0x100000 but it does not start

    Did you check your application program to generate this binary was configure to run from 0x1000000?

    0693W00000KcgnaQAB.pngYour bootloader must be in Copy in RAM 0x00FC0000

    Your application program must be in Execute from Flash 0x01000000

    BRs,

    -Olivier

    Ravi S
    Ravi SAuthor
    Associate II
    March 16, 2022

    Hi Olivier sir,

    Thanks for your replay i will check and update ASAP.

    But what is the main difference between Load in RAM and Copy in RAM if you have any documents pls share with me.

    Thanks regards

    Ravi.S

    ODOUV.1
    ST Employee
    March 16, 2022

    Hello Sir,

    the firmware updater documentation can be found in your project here:

    0693W00000KcnQEQAZ.pngBRs,

    -Olivier

    Ravi S
    Ravi SAuthor
    Associate II
    March 16, 2022

    I have that document sir .As per this document only i am doing but no result.

    Ravi S
    Ravi SAuthor
    Associate II
    March 16, 2022

    Hi sir,

    As per your suggestion I done following thinks

    1.Load the bootloader code into address 0x00FC0000 using Copy in RAM method.

    2.Using external MCU send following data to SPC584B-DISP board.

    Step 1:-

    External MCU Send Password(FE ED FA CE CA FE BE EF) to SPC5 MCU. SPC5 MCU once receive password and compare and response(00 00 00 01 CA FE BE EF) ack is OK.

    Step 2:-

    External MCU Send Bin file size(00 00 00 00 00 00 4F 38) to SPC5 MCU.SPC5 MCU echo the bin size to External MCU OK.

    Step 3.

    External MCU Send bin file 8 byte at a time .SPC5 MCU receive data and write into flash(0x01000000) and echo response to External MCU OK.

    Step 4:-

    Final step Jump to app not Happening.

    If I make any mistake please let me know.

    Thanks

    Ravi.S

    ODOUV.1
    ST Employee
    March 16, 2022

    Hello Sir,

    may be you forgot this step?

    Step0:

    When you generate your application binary, you must generate it to run from flash at address 0x01000000:

    0693W00000KcnSUQAZ.pngBR,

    -Olivier

    Ravi S
    Ravi SAuthor
    Associate II
    March 16, 2022

    I done this steps sir not forgot .

    I attached the screenshot for your 0693W00000KcnZkQAJ.pngfor your reference.

    ODOUV.1
    ST Employee
    March 16, 2022

    Thank you for your confirmation,

    Looking deeper in document and in code, It seems to be the normal behavior.

    It is explained in document in step3:

    0693W00000Kco3WQAR.pngMCU must be restarted after programming to enter into new program, because the jump to new program is not called at end of programming.

    Best Regards,

    -Olivier

    Ravi S
    Ravi SAuthor
    Associate II
    March 16, 2022

    Hi sir ,

    Thanks for your replay.

    Once all code downloaded .Power OFF/ON the Board or press reset button .I tried both method .After restart bootloader code run and stopped .My app code not running.

    I attached the status LED screenshot for your reference.

    0693W00000KcoGPQAZ.png 

    Once all bin file write into flash .Then I restart MCU .After restart Led 1 ON for 5 sec the Both the LEDs ON always .Nothing happened .

    ODOUV.1
    ST Employee
    March 16, 2022

    I wonder if you are not confused by wrong LED status

    because on SPC584B, the LEDs are not connected from PADs to GND,

    but there are connected from PADs to VDD.

    So by default, when the program set the PAD to level High, the LED is OFF

    and when the program set the PAD to level Low, the LED is ON

    LED1 is on PortF8

    LED2 is on PortF9

    You have to invert the configuration for both LED1 and LED2:

    0693W00000KcobhQAB.pngWould you please check that in Board Initialization -> IO settings ?

    BRs,

    -Olivier

    Ravi S
    Ravi SAuthor
    Associate II
    March 16, 2022

    Hi Sir,

    I checked the Board Initialization LED configure correct only.

    If LED status wrong also app code will run right .My app code is simple program ON/OFF 3 LED s one by one. I tested this app code using UDE STK 2021 tool to flash the code and reset the board its work fine ,

    But UART bootloader mode only not running I try this around 1 week . But not able to complete .

    If u have any ide pls share me .

    Thanks regards

    Ravi,S

    ODOUV.1
    ST Employee
    March 16, 2022

    Sir,

    I just sent you 3 files:

    1) SPC584Bxx_RLA PIT Test Application for Discovery 2.zip

    in the build directory, you will find application program binary out.bin to flash at address 0x1000000

    Then, when you switch ON your board, you should see :

    LED1 blinking every 1 sec,

    LED2 blinking every 2 sec,

    LED3 blinking every 4 sec.

    2) SPC584Bxx_RLA Bootloader Test Application for Discovery 2.zip

    in the build directory, you will find bootloader program binary out.bin to flash at address 0xFC0000

    Then, when you switch ON your board, you should see :

    only LED1 set ON for 5 sec

    then all LEDs OFF

    3) spc5loader.zip

    This is the PC tool to use with bootloader

    flash the bootloader binary from 2)

    connect an USB cable from your PC to the MCU Dicsovery2 USB

    launch the spc5loader tool and configure it with good COM and the application binary out.bin from 1)

    0693W00000KcqSIQAZ.pngthen switch ON the board

    only LED1 should be ON

    and clicl on Program within 5 sec

    if load works correctly, at the end you should have LED1 ON and LED2 ON

    then reboot the MCU, you should see LED1 for 5 sec

    and then the 3 LEDs should blink ever 1sec/2sec/4sec

    BRs,

    -Olivier

    jmary
    Associate III
    September 1, 2022

    Olivier, would you please send the files also to me.

    ODOUV.1
    ST Employee
    September 1, 2022
    Ravi S
    Ravi SAuthor
    Associate II
    March 17, 2022

    HI Sir ,

    Thanks for your replay .

    As per your last replay i done following things please check once .

    Step 1.

    Restart MCU and Using spc5loader load the SPC584Bxx_RLA Bootloader Test Application for Discovery 2 out.bin file.

    0693W00000KcwiRQAR.png0693W00000KcwiWQAR.pngStep 2:-

    Restart MCU. Using spc5loader load the SPC584Bxx_RLA PIT Test Application for Discovery 2 out.bin file.

    0693W00000KcwjKQAR.pngStep3:-

    After Program flash completed .Restart MCU.

    First 5 sec LED 1 ON .& LED 2 OFF

    After 5 Sec LED 1 & 2 OFF nothing happened.

    I attached the pictures for your reference. One more thing I am using your bootloader and your app file only for flash and testing.

    1.After restart MCU.First 5 sec.0693W00000KcwlkQAB.jpg2.After 5 sec all LED OFF nothing happened.

    0693W00000KcwluQAB.jpgStill program load but not executed sir.

    Thanks & Regards

    Ravi.S

    ODOUV.1
    ST Employee
    March 17, 2022

    Hello Ravi,

    Sorry but you did not follow what I asked.

    Let's redo step by step.

    Step 1) SPC584Bxx_RLA PIT Test Application for Discovery 2.zip

    ****Do not try to regenerate or rebuild, just unzip and use like this.****

    in the build directory, you will find application program binary out.bin to flash at address 0x1000000

    ****Do not use spc5loader, use your normal flasher tool ****

    ****Remark we do not flash Bootloader program but PIT program here****

    ****Before to flask PIT program at 0x1000000, please erase all your flash partitions ****

    Then, when you switch ON your board, you should see :

    LED1 blinking every 1 sec,

    LED2 blinking every 2 sec,

    LED3 blinking every 4 sec.

    Please do this Step 1 exactly like this.

    I flashed this PIT binary using PLS on my SPC584B-DISP board and it works (3 LEDS are blinking).

    Tell me what happens on your side.

    Best regards,

    -Olivier