This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/TMS570LS1224: Uart Bootloader

Expert 1660 points
Part Number: TMS570LS1224
Other Parts Discussed in Thread: UNIFLASH

Tool/software: Code Composer Studio

hello ,

please could anyone check my bootloader project,i successfully received the updating results which shown in figure 3,but i have problem with keyboard inputs the code got stuck at the function UART_getKey

the return key is always 0 .

char UART_getKey(sciBASE_t *sci)
{
char key = 0;

/* Waiting for user input */
while(1)
{ //if ((sci->FLR & SCI_RX_INT) != 0) if ((sci->FLR & (uint32)SCI_RX_INT) != 0) { key = (char)sci->RD; break; } } return key; }

so i couldn't download the .bin file of my application . or execute it .

( i followed SafetyMCU_Bootloader ---------> ls12_uart_boot) with the .bin file of my application project 

  • Hello,

    Do you get the bootloader meno on COM terminal? The baudrate of SCI2 in bootloader is 115200, please make sure that the baudrate of COM port is also 115200.

  • Hello QJ Wang,

    the baudrate of com is 115200

    as i said i successfully received the bellow strings so the UART should work correctly. but when pressing 1 to download the app. image no thing happen .

    i attached my codes could you please have a look  or even test them. 

    2)the image size is 27k where to set this value in the code and what is the maximum image size to be sent via Y modem protocol?? 

    3)i know that HERCULES has sector protection  is this for bank, sector or  block? and how much its size?

    (It is possible to prevent a write operation on a sector by the software configuration of the Flash wrapper.
    The sector protection registers, Bank Sector Enable Register (BSE), contain a bit for each sector in the
    Flash bank, which enables or disables a sector for write operation.)       

    ================== Main Menu ==========================

    1. Download Application Image To the Internal Flash 
    2. Upload The Application Image From the Internal Flash 
    3. Execute The Application Code 
    4. Get Bootloader Version 
     5. Get Device Information 

    =======================================================

  • Hello,

    Thanks for providing those information.

    1. I will do test with your code on TI Launchpad. 

    2. There is no limitation to the image size for Y-modem. In Y-Modem protocol, the packet size for header is 128B, for data is 1KB. The issue in your test is not related to image size. There is no response to the char input on RX pin.

    3. Yes, the flash bank and sector are protected. The bootloader activates the flash bank and sectors before performing flash erase/write (bl_flash.c).

    for (i = ucStartBank; i < (ucEndBank + 1); i++){
    Fapi_setActiveFlashBank((Fapi_FlashBankType)i);
    Fapi_enableMainBankSectors(0xFFFF); /* used for API 2.01*/
    while( FAPI_CHECK_FSM_READY_BUSY != Fapi_Status_FsmReady );
    }

  • Hello,

    I tested your code on LS1224 Launchpad. The menu doesn't come up to my TeraTerm terminal. 

    I run the original TI uart bootloader example, I got the menu like this:

  • hello QJ Wang,

    thanks for your answers , and for your kindness

    1)could you please share with me the UART bootloader project that you tested in my launchpad and does the UART_getKey(); works with you???  did you test the bootloader with my .bin file (blinking application code) and did you successfully download the .bin file without any problem for Y modem side?? and executed the code correctly?

    could you tell my the problem with my bootloader code.(you said above There is no response to the char input on RX pin how to solve this problem i tried to enter char. from keyboard without any success)

    2)about the sector protection  sizes ,bank0 is 1.25MB and bank 7 is 64KB ??

  • Hello,

    I can download your blinky bin file to flash, but bin doesn't work (no led blinky)

    2. The bank0 os 1.28MB, and bank7 is 64KB. All the flash sectors are protected. The issue in your bootloader migh be caused by your SCI configuration. It is not related the flash banks or sectors.   

  • Dear QJ Wang,

    could you try this image file it's (blinky file i tested it with uniflash) with your bootloader.

    and please could you share with me your bootloader that you tested with my launchpad because yes i think my problem is with the sci_common.c     file 

    8267.blinking1.rar

  • Hello Ahmad,

    What I used is the original example of UART bootloader. I just checked your application code (blinking), everything looks fine to me (cmd file, intvec). I will test it later.