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.

TMS320C6657: How to start UART BOOT on c6657 custom PCB

Part Number: TMS320C6657

We are trying to do a UART mode boot of a C6657 on a custom PCB.

I have looked up articles related to UART BOOT on TI's forum, but when I  trying to convert the. out compiled by CCS to XMODEM (supported by C6657 UART BOOT MODE) according to some articles. However, the converted file was downloaded to the device through TeraTerm, the result was that the device always no responding.
So I would like to consult TI engineers on the following questions:
1. How can I convert the. out file generated by CCS compilation into a CRC XMODEM image file supported by UART BOOT MODE?
2. During the power on process of the development board, besides configuring the boot mode to UART BOOT MODE( up needed pin voltage), are there any other operations involved?

3. Is there any way I can check my custom PCB really in UART BOOT MODE, (Just can I use CCS with JTAG to check some register value)?

  • Hi, Shankari G

      Thank you for your reply;
    Due to some special reasons, we need to test the UART BOOT MODE during our development project process, and when power on the development board with UART boot mode and then download the image to the DSP.
    And we downloaded the image to the DSP without using CCS software, we also do not want to download the image to FALSH.
    Therefore, we wanted to test UART BOOT MODE. However, during the testing of UART BOOT, we encountered the issue I mentioned above.
    And I also checked through JATG that the content of the BOOT PARAMETER Table has been set to the corresponding UART BOOT PAYTER parameters.

    I have read the FAQs in your reply, but unfortunately, they cannot meet my requirements. However, I am still very grateful for providing other BOOT modes for my reference.

    I still need help with UART BOOT MODE. I'm not sure if there are enough colleagues among you who are familiar with UART BOOT. If you could get their help, I would greatly appreciate it.

  • I have looked up articles related to UART BOOT on TI's forum, but when I  trying to convert the. out compiled by CCS to XMODEM (supported by C6657 UART BOOT MODE) according to some articles. However, the converted file was downloaded to the device through TeraTerm, the result was that the device always no responding.

    You have to convert the .out into .bin using the Boot-tools provided in thePROCESSOR-SDK-RTOS-C665x 06_03_00_106
    http://software-dl.ti.com/processor-sdk-rtos/esd/C665x/latest/index_FDS.html

    But there is no specific format for Xmodem.

    Please note that the"XMODEM" is the option which has to be selected when using the "teraterm" utility in windows. 

    In the teraterm options, when selecting the protocol, select Xmodem(CRC) ( I guess, that is what is mentioned in the DSP bootloader guide )

    Please refer this e2e thread for the step by step procedure to convert the .out to .bin

    https://e2e.ti.com/support/processors-group/processors/f/processors-forum/235540/c6657-uart-boot/851198#851198

     

    2. During the power on process of the development board, besides configuring the boot mode to UART BOOT MODE( up needed pin voltage), are there any other operations involved?

    For uart boot mode, you have to configure the boot mode registers according to https://www.ti.com/lit/ug/sprugy5c/sprugy5c.pdf.

    No other operations needed.

    ---

    6.28.1 Boot Device Field

    The Boot Device field BOOTMODE[2:0] defines the boot device that is chosen. Table 6-64 shows the supported boot modes.

    BOOTMODE[2:0]  --- 0 - for uart

    --

    6.28.2 Device Configuration Field

    The device configuration fields BOOTMODE[9:3] are used to configure the boot peripheral and, therefore, the bit definitions depend on the boot mode.

    6.28.2.1.2 UART Boot Mode

    UART boot mode is shown in Figure 6-29 and described in Table 6-67 ----- For speed and parity configurations.

    And I also checked through JATG that the content of the BOOT PARAMETER Table has been set to the corresponding UART BOOT PAYTER parameters.

    Please do check the other configuration settings like speed and parity etc... as I mentioned above...

    Regards

    Shankari G

  • Hi, Shankari G

    Sorry to bother you again.

          I have followed you advice, and tested on my development board. Unfortunately, I still can't use uart to boot my board correctly.

          I see you provided the addrsee of Boot Parameter table in this post ( Where is the boot parameter table in c6657 L2 - Processors forum - Processors - TI E2E support forums) . So .I checked BOOT PARAMETER TABLE, all value I verified  is correct.

     

    I checked BootMode--Uart,  Uart boot configuretion: Protocol、Data bits 、Stope bits、Parity、DataRate(115200)、etc

    In C6657 data sheet, I see the BOOTCOMPLETE register. so I checked this register value, it is 0x00000000, this means ROM booting process still going.

     

          Another question

        In this post (C6657 UART boot - Processors forum - Processors - TI E2E support forums) replaied by . He said "5. Power on the board. You will see letter C get typed few time in the console. This is the ping."

        I didn't get a "C" letter in my console. Does this mean the RBL  configured the UART peripheral failed or not.

       Is there any way way can I used to checked why my device boot failed? I would greatly appreciate it if you could provide corresponding methods and suggestions.

      Thank you very much.

  • Hi

    Let me look at your snapshot and get back..

    Meanwhile try the following suggestions

    i.e., to make sure that the UART peripheral is working fine with the standard UART example on your custom PCB. 

                 These standard UART examples are part of the TI offerings in the name of Processor SDK 6.3

    ---> I mean, as a first step, let us make sure that the UART works fine with a sample UART example using no-boot mode in CCS.

    This way, we will make sure that the uart is fine in your custom PCB

    and then.... let us move to the method of booting from uart.....

    Please refer this FAQ on how to test-run the UART peripheral using the demo-example given in the processor SDK 6.3:-

     [FAQ] TMS320C6657: UART Example project for C665x family devices - Processors forum - Processors - TI E2E support forums

    Regards

    Shankari G

  • Hi, Shankari G 

    I followed your suggestion, tested the standard UART example on my custom PCB. The result is that all test have passed.

  • Hi

    Ha, Wonderful...

    Let me map your register values and get back.

    Regards

    Shankari G

  • Hi,

    Would you please post the value of DEVSTAT register?

    i.e., the value at 0x02620020  ??? 

    The boot mode bits 0-2 should have value, "0" as per my first pic in my previous post.

    --

    Please refer page no: 205, section 8.3.1 https://www.ti.com/lit/ds/symlink/tms320c6657.pdf

    13-1 BOOTMODE[12:0] Determines the bootmode configured for the device. For more information on bootmode, see Section 6.28 and see the Bootloader for the C66x DSP User's Guide

    --

    In the DEVSTAT register,

         Bits[13- 1] maps to BOOTMODE [12:0] ------> i.e., Bits 1,2,3 of DEVSTAT register should have value, "0" for UART mapping to bits 0,1,2 of BOOTMODE

         Bit [0] - is for Little endian / Big Endian

                      ( Check your endian settings too -  the bootstrap value latched through the external pin )

    Regards

    Shankari G

  • Hi, Shankari G 

    Here is the DEVSTAT register value when i connect my custom PCB

  • Hi,

    When I expand the value in your DEVSTAT register...

    0x00000011  - Hex value to Binary expansion...

                1 - 0001 

                           - 0th bit, value = 1 - Little endian

                           - 1, 2,3 bits, value = 0 - UART - Device Boot mode

                1 - 0001

                          - 4,5,6 bits - value = 1 - Submode selection. - 1 = UART port 0 boot

                         - 7th bit - Value = 0 -- UART parity used during boot. • 0 = None ( 7,8 and 9 bits of DEVSTAT ) --> Check in your code that the parity is NONE 

                0 - 0000

                         - 8th bit - value =0 - UART parity used during boot. • 0 = None ( 7,8 and 9 bits of DEVSTAT )  --> Check in your code that the parity is NONE 

                        - 9th and 10th bit - value =0 - UART interface speed. • 0 = 115200 baud ( 9 and 10 bits of DEVSTAT )  --> Check in your code that the speed is  115200 baud rate.

                 0 - 0000

    ----------------

    NEXT STEP :-

    ===========

    ---> Focus on the Clock derived to the UART peripheral during the boot time.

    Page no:85, https://www.ti.com/lit/ds/symlink/tms320c6657.pdf

    SYSCLK7: 1/6-rate clock for slow peripherals (GPIO, UART, Timer, I 2C, SPI, EMIF16, McBSP, and so forth.) and sources the SYSCLKOUT output pin.

    -----> Check the SYSCLK7 while running the UART example and compare it while booting through UART. 

    ------> Check at what clock frequency UART is driven in your custom board....

    Regards

    Shankari G

  • Hi, Shankari G 

    Great news to tell you. It seems like The UART BOOT MODE start succeed in my custom board.

    We successfully get a leter 'C' and trans bin file.

    Your guide ask me to 'Focus on the Clock derived to the UART peripheral during the boot time.' helps me a lot.

    We found that the INPUT CLOCK FREQ(MHz) we provide for dsp is 100(MHz). But we configured the bootmode as[0b000] .  Actually, this bootmode pin just need 50MHz for dsp. Then, I configured bootmode[12:10] as 0b011, Ican get a leter 'C' on my console .

     

    Next step I tried trans bin file, but I got some problem. I tried 2 project, they goes well when use noboot mode to debug the code. 

    1. I used ti supported uart demo compiled 'UART_BasicExample_C6657_c66xDMATestProject.out' followed the step to conv .out file to .bin file.

    The step is provided from your previous message replay: C6657 UART boot - Processors forum - Processors - TI E2E support forums

      The step is:

              1.hex6x  -boot  -a  -e=_c_int00 -order=L  -memwidth=32  -romwidth=32  -o <file.hex>  -map <file.map>  <file.out>

              2.b2i2c file.hex file.1 

              3.b2ccs file.1 file.2

              4.ccs2bin file.2 file.bin

    when i reached the second step, I got an error report 'Max input array size exceeded'. is there any guide for my to figure out what array size excceed?

    2. I tried any other project to converte .out file to .bin file, it succssfully converted , and use TeraTerm trans successfully. but it did execute what my .out  image complied by C code. It's a very simple project, I just to use UART to printf a string.

    So, my question is:

        a. the step to converte .out file to .bin file correct ?

        b. Is there any special sample project can ti share to us to test uart boot ?

     Thank you very much.

  • Hey Buddy,

    Clock-frequency:-

    That's a great news. Congrats. You are welcome...

    ---

    To boot from UART, do not try to boot-and-run the "UART-demo" app.

    Try some simple hello world example ( .out )  and do the conversions....

    Create a simple helloworld example using CCS.

    If you couldn't, please let me know, I shall post you a video on how to do the same...

    Regards

    Shankari G

  • Hi, Shankari G 

    I would greatly appreciate it if you could provide me with a video as a reference.

    Thank you very much.

  • Hi, Shankari G 

    If I want to achieve LED flash through UART BOOT, is there anything I need to pay attention to?

  • Yes, you can toggle LED through GPIO.

    --

    Let me post a video on how to create a hello world application in CCS 9.3 for C6657.

    Regards

    Shankari G

  • Hi, Shankari G 

    One more question I want to ask.

    In the the 'DSP Bootloader User Guid', it just descriped the RBL loading process ' Once the RBL starts receiving the table, it will decode the boot table load the image in appropriate memory locations.'

    These days I have read so many user guide file, but I still didn't get any infomation about when I use TeraTerm send bin file to dsp  where the image stored in dsp memory, and the start address to execute my image.(As far as I know, other boot mode used magic address to run  user image).

  • HI,

    Attached a video below.

    It has the following.

    1. A sample program creation for C6657 using CCS 9.3

    2. A sample linker.cmd

    3. Some GPIO register settings to confirm your UART boot.

    ---

    After your UART boot, connect to CCS,

    Go to memory browser window and feed the GPIO register address as "0x2320000 " . 

    Please note that the value is "00000100" in GPIO_bank_registers_out_data.

    #define GPIO_BASE (0x2320000)
    #define GPIO_DIR_OFFSET (0x10)
    #define GPIO_SETDATA_OFFSET (0x18)
    #define GPIO_CLEARDATA_OFFSET (0x1C)
    
    void testfunc();
    
    void testfunc()
    {
    
        while (1)
        {
            asm("   IDLE");
    
        }
    }
    
    void main(void)
    {
    
        volatile uint32_t *reg_val;
    
         reg_val = (volatile uint32_t *)(GPIO_BASE + GPIO_DIR_OFFSET);
         // configure as output pin -- write 0 to the Direction register
         *reg_val &= ~ (1 << 8);
    
    
         reg_val = (volatile uint32_t *) (GPIO_BASE + GPIO_SETDATA_OFFSET);
         // Write value 1 in the set data register, so that Out data register will be 1
         *reg_val |= (1 << 8);
        testfunc();
    
     // After the UART boot, connect to CCS, open the memory browser window and give address 0x02320000
    // The value of 0x02320014 will be set as 00000100.
    // By this way... you can set some register values........and you can confirm that,  your UART boot is successful.... :- )
    
    }
    
    

    --

    /******************************************************************************
     * Copyright (c) 2010-2011 Texas Instruments Incorporated - http://www.ti.com
     *
     *  Redistribution and use in source and binary forms, with or without
     *  modification, are permitted provided that the following conditions
     *  are met:
     *
     *    Redistributions of source code must retain the above copyright
     *    notice, this list of conditions and the following disclaimer.
     *
     *    Redistributions in binary form must reproduce the above copyright
     *    notice, this list of conditions and the following disclaimer in the
     *    documentation and/or other materials provided with the
     *    distribution.
     *
     *    Neither the name of Texas Instruments Incorporated nor the names of
     *    its contributors may be used to endorse or promote products derived
     *    from this software without specific prior written permission.
     *
     *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
     *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
     *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
     *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
     *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
     *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
     *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     *
     *****************************************************************************/
    /*
     *  Linker command file
     *
     */
    
    -c
    -heap  0x41000
    -stack 0xa000
    
    /* Memory Map 1 - the default */
    MEMORY
    {
        L1PSRAM (RWX)  : org = 0x0E00000, len = 0x7FFF
        L1DSRAM (RWX)  : org = 0x0F00000, len = 0x7FFF
    
        L2SRAM (RWX)   : org = 0x0800000, len = 0x080000
        MSMCSRAM (RWX) : org = 0xc000000, len = 0x100000
        DDR3 (RWX)     : org = 0x80000000,len = 0x20000000
    }
    
    
    SECTIONS
    {
        .csl_vect   >       MSMCSRAM
        .text       >       MSMCSRAM
        GROUP (NEAR_DP)
        {
        .neardata
        .rodata
        .bss
        } load > MSMCSRAM
        .stack      >       MSMCSRAM
        .cinit      >       MSMCSRAM
        .cio        >       MSMCSRAM
        .const      >       MSMCSRAM
        .data       >       MSMCSRAM
        .switch     >       MSMCSRAM
        .sysmem     >       MSMCSRAM
        .far        >       MSMCSRAM
        .testMem    >       MSMCSRAM
        .fardata    >       MSMCSRAM
        platform_lib > 		MSMCSRAM
    }
    
    

    Go to this link and scroll down to the last screenshot.

    [FAQ] TMS320C6657: How to run the direct SPI-BOOT example on TI-C6657-EVM without IBL ? - Processors forum - Processors - TI E2E support forums

    U should be able to get the memory window and memory values after your UART boot.

    ALL the best!

    Regards

    Shankari G

  • Hi, Shankari G 

    Sorry to bother you again.

    a bad news to tell you.

    I tried you provided led Demo, compiled successfully, use Tera Term trans bin file successfully, and then connect to ccs, I checked the address 0x02320014. I was not 00000100...

    I remembered there is a register is '(BOOTCOMPLETE) Register ', so I checked this register value. It is 0. So that, the uart boot is not compelete.

    I'm very confused now.

    Do you have any more suggestions.

    Thanks.

  • Hi, Shankari G 

    I have another discovery. 

    I have download  provided bin file in : (+) C6657 UART boot - Processors forum - Processors - TI E2E support forums

    And then connect to ccs. I checked the (BOOTCOMPLETE) Register  value = 0x00000001, which means uart boot successed.

    So, I guess maybe the reson why I can't boot successfully is the bin file I converted is  incorrect.

    I'm not sure if it's convenient for you to provide detailed steps for converting. out files to .bin files.

    Thanks.

  • That's why I suggested to use a simple hello world program and then do the conversion.

  • Hi

    I have not provided you the LED program.

    I have provided a video on how to create a simple hello world program, in which I added some register settings...

    Regards

    Shankari G

  • Hi, Shankari G 

    Great news to tell you.

    After so many times test .out file convert to bin file. The post In 

     TMS320C6657: UART Boot mode problems - Processors forum - Processors - TI E2E support forums

    showed the correct step to convert .out file to bin fil for UART BOOT mode.

    • hex6x -a -order=$(ORD) -boot -e=_c_int00 -bootorg=0x0400 -memwidth32 -romwidth32 -o=tmp.btbl <application.out>
    • b2ccs tmp.btbl application.btbl.ccs
    • swap16  application.btbl.ccs application.btbl.swap.ccs
    • ccss2bin application.btbl.swap.ccs application.btbl.swap.bin

    Followed his step, I convert led flash out file to bin file. And the use TeraTerm to trans bin file. I see the the led successfully flashed in my custom pcb.

    Thank you very much for providing technical guidance these days.

    Thank you very much. 

    ٩(๑❛ᴗ❛๑)۶

  • Hmm, That's great.

    You are Welcome!

    Would you please provide all the consolidated steps for UART boot process.

    This will help other forum customers to a great extent particularly on their custom boards.....

    Upload all the binaries posted by Rahul and the conversion steps etc...

    Regards

    Shankari G

  • Hi, Shankari G 

    I still have some other work to do, so I just made a simple summary about UART BOOT.

    I hope these file can give a hand to other customers.

    Thank you.

    UartBootPack.zip

  • Thanks.

    Your attached-doc will help other customers to a great extent.

    I am glad, you were able to spend time and contribute to Forum. 

    ( PS: - ".docx" - in the zip is not openable. Other customers :- Please rename the extension as ".doc" ) 

    Regards

    Shankari G