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

    Ravi S
    Ravi SAuthor
    Associate II
    March 17, 2022

    Hi sir,

    I loaded PIT program at 0x1000000 using UDE STK 2021 PLS tool (3 LEDS are blinking).as per program work fine.

    Step1:- Erase flash

    0693W00000KcxcoQAB.pngStep2:- Load PIT program

    0693W00000Kcxd8QAB.png 

    Hi sir using this UDE STK 2021 PLS tool to flash program I already tried my code for both app and bootloader code work fine .Only think If I loaded bootloader using this tool app code using other controller via UART only not works.

    Thanks

    Ravi.S

    ODOUV.1
    ST Employee
    March 17, 2022

    Is everything works well now using last PLS version ?

    Sorry Ravi, I do not understand your last sentence:

    "Only think If I loaded bootloader using this tool app code using other controller via UART only not works."

    Would you please reformulate ?

    BRs,

    -Olivier

    Ravi S
    Ravi SAuthor
    Associate II
    March 17, 2022

    Hi sir,

    We have two codes

    1.Bootloader code

    2.App code .

    My scenario is

    1.first I loaded Bootloader code to 0x00FC0000 using UDE STK 2021 PLS tool .

    2.Then Restart SPC5 MCU .

    3.Bootloader code wait for 5 sec via UART from other MCU any new code coming or not. If other MCU new app code present means other MCU send password to SPC5 board

    4.So SPC5 bootloader validate password .If password is correct SPC5 board send ACK to external MCU. wait for bin file size and bin file.

    5.Other MCU send all bin file to SPC5 via UART .SPC5 board write data to 0x01000000 flash address. Once all bin file write in to flash.

    6.I restart SPC5 MCU .SPC5 MCU after restart wait for 5 seconds .up to this point work fine,

    7.Next and final step Jump to new code need to happen .New program need to execute but nothing happen.

    This is my problem sir.

    Thanks

    Ravi.S

    ODOUV.1
    ST Employee
    March 17, 2022

    Ok thanks.

    So nothing is new, you already have original issue with your program.

    Let's continue investigation step by step with my programs I sent to you yesterday:

    Step 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

    ***Please use PLS to erase all partitions and flash my Bootloader binary at 0xFC0000***

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

    only LED1 set ON for 5 sec

    then all LEDs OFF

    Please do it and confirm if step2 is working at your side

    BRs,

    -Olivier

    Ravi S
    Ravi SAuthor
    Associate II
    March 17, 2022

    Yes sir ,

    Step 2 working fine.

    Thanks

    Ravi.S

    ODOUV.1
    ST Employee
    March 17, 2022

    Ok good.

    Step 3) spc5loader.zip

    This is the PC tool to use with bootloader

    ***Do not use PLS anymore***

    Assuming you flased my bootloader binary from step 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 Step 1)

    *** Use out.bin from PIT application zip ***

    0693W00000KcqSIQAZ.pngthen switch ON the board

    only LED1 should be ON

    and click 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

    Please do this step3 and let me know

    BRs,

    -Olivier

    Ravi S
    Ravi SAuthor
    Associate II
    March 17, 2022

    Hi sir,

    Step1.

    I loaded your bootloader using PLS done.

    Step2.

    Restart MCU within 5 sec using spc5loader  to load PIT code .Done.

    Once flash completed both LED1 ON and LED2 ON done.

    Step3:

    Restart MCU again.

    first 5 sec LED 1 ON.

    After 5 Sec our PIT code running ( 3 LEDs should blink ever 1sec/2sec/4sec) .

    Using this tool spc5loader work fine sir.

    But using other MCU what can i do sir.

    Thanks

    Ravi.S

    ODOUV.1
    ST Employee
    March 17, 2022

    OK good,

    So first conclusion, your board in working normally with default bootloader system via USB

    now Step4 ) We will do the same than step3 but with your own application binary

    ***Do not use PLS anymore ***

    ***Keep my Bootlader in your board flash at 0xFC0000***

    Use spc5loader to download YOUR application binary via USB

    Then when rebooting the bard, you shoud see LED1 ON for 5 sec

    and then you should see your application starting

    please do this Step4) and tell me if your application is starting 5sec after switch ON the board, and works fine

    Please let me know

    BRs,

    -Olivier

    Ravi S
    Ravi SAuthor
    Associate II
    March 17, 2022

    Hi sir,

    1.I keep your bootloader.

    2.Flash my app code using spc5loader  via USB.

    3.Then restart MCU.

    4.After 5 sec my code running sir.

    Thanks

    Ravi.s

    ODOUV.1
    ST Employee
    March 17, 2022

    Thank you Sir, good !

    So new conclusion, your Application program is working perfectly

    1) Now let's look at your bootloader program which is using LIN6 instead of LIN4

    and pinmap PD14/PD15 instead of PA0/PG15

    do you confirm ?

    2) Let's look to your connections

    0693W00000Kcz3WQAR.pngThere is a big 4*37 connector X9 on the side of your board

    each pin named vertically with a character among ABCD, and horizontally with a number from 1 to 37

    Do you confirm you connect to the other board using pins D2 and D11 ?

    SPC584B LIN6 TXD D11 => RX on other MCU host

    SPC584B LIN6 RXD D2 => TX on other MCU host

    BRs,

    -Olivier