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.

Code does not Run when disconnected from the Code Composer Studio.

Other Parts Discussed in Thread: TMS570LS20216

Hello,

 

I am using TMS570LS20216 Micro in the USB Kit. I was able to flash the code fully and run fully  from the Code Composer Studio(CCS). When i closed the CCS and gave power to the board(by connecting to a USB port) it does not run anymore.

Can you please let me know how to solve this.

 

Thanks in advance,

Renjith George

  • Hello Renjith,

    The peripheral I/Os on the LS20216 microcontroller have a mdoe in which the input buffer gets disabled. This happens when the programmable pull direction is configured as a pull-down (PSEL = 0) and then the pull is disabled (PULDIS = 1).

    If the execution of your code depends on receipt of a valid input, please check the above two controls for that particular input signal.

    When the debugger is connected, the test reset (nTRST) is driven High (inactive) by the emulator. This overrides the controls for the input buffers and enables them as long as nTRST is high.

    Regards,

    Sunil

  • Dear Sunil,

     

    Thanks for your suggestions.

    In my case i am not taking any valid input from the pins in my code.

    I got the problem rectified. If i elaborate my observations:-

    1. when the debugger connected then it works perfect.

    2. when i disconnect the debugger but do not remove the USB board from the USB port still it worked fine

    3. When i unplugged the USB board from the USB port and plugged it in again it did not work.

     

    I felt like it was something related to "volatile" nature of some memory. I checked the "sys_link.cmd" file  and observed that CINIT section was mapped to the RAM.

    I changed that to the FLASH area and now it is working fine in 3rd scenario also.

        CINIT (RW)         : origin=0x08027E00 length=0x00000200      /* 512 Bytes */ -- RAM

     SECTIONS
    {
        .intvecs :  {} > VECTORS
        .text    :  {} > FLASH0
        .const   :  {} > FLASH0
        .cinit   :  {} > FLASH0  /* .cinit   :  {} >  CINIT */
        .pinit   :  {} > FLASH0
        .bss     :  {} > RAM
        .data    :  {} > RAM
        /*.stack :  {} > STACK */
        .sysmem  :  {} > SYSMEM

    /* USER CODE BEGIN (4) */
    /* USER CODE END */
    }

    Please correct me if i am wrong.

    Thanks for all your support once again.

     

    With Best Regards,

    Renjith George

     

     

     

  • Yep, .cinit should be linked into flash,  it's used at runtime to initialize variables in the RAM.

    BTW - Where did you get the linker command file that linked .cinit into RAM - was this in something TI provided?  If so would like to get that corrected.

    Thanks

    Anthony

     

  • Dear Anthony,

    Thanks for the confirmation .

    I modified and made the linker command file to ram on my own. It is no mistake from TI.

    With Best Regards,

    Renjith George