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.

HALCoGen 3.0 Code Does not work on cold power up.

Other Parts Discussed in Thread: TMS570LS3137, HALCOGEN

I am using a TMS570LS3137 HDK dev board and with the demo code it will power up and execute the program.

When I create a new program using HALCoGen (Version 3.0) the code will run from the built in debugger.

The program (put in sys_main.c) simply loops turning on and off one of the LEDs. I can unplug the debugger USB cable and hit either reset and the program will run. But when I power cycle the HDK dev board itself the nERROR led comes on and the program does not run and no reset makes the program run.

Does the HALCoGen startup code work form power up? I tried both the TMS570LS3137 as the HAL target and the TMS570LS3137HDK as the target with the same result. I did not change any HALCoGen settings.

Thanks,

John

  • This might be due to the CCMR4 errata. It will be fixed in RevB. Anyway, I don't think the interrupt can be enabled before the ISR is initilized. The way that interrupt is enabled inHalCoGen 3.0.0 is NOT recommended. Try this:

    1. Comment or delete ‘cpsie if’ in sys_core.asm

    2. Add following code in sys_startup.c
    /* USER CODE BEGIN (14) */
    esmREG->ESTATUS1[0]=0x080000000;
    esmREG->ESTATUS1[1]=0x000000004;
    esmREG->ESTATUS2EMU=0x000000004;
    esmREG->KEY=0x05;
    /* USER CODE END */
     
    And after your code enter sys_main.c, enable the interrupt:
     asm(" cpsie if");
     
    This is the workaround when I use HalCoGen 3.0.0. If the pin nTRST is pull high, you might still get the problem of "Can not startup". This is another bug that will be fixed in RevB too.