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.

TMS320F2800135: Sysconfig debug error

Part Number: TMS320F2800135
Other Parts Discussed in Thread: SYSCONFIG, C2000WARE

Tool/software:

(Registers window screenshot when 135 is running and 135 syscfg file is being used)

(Expressions window screenshot when 135 is running and 135 syscfg file is being used)

(Expressions window whose value keeps on changing when 39C is running and 39C syscfg file is being used)

(Registers window screenshot when 39C is running and 39C syscfg file is being used)

I've created two different syscfg files for two different ICs, 39C IC and 135 IC, and their linker command files as well along with them which I exclude or include depending on the requirement, while running the code in 39C IC it is working well and showing the epwm and adc output both but when I transfer it from 39C IC to 135 IC it is not showing any output even though it doesn't give any build error and also when I try to run the same project in the empty project for 135 IC, then it works properly, please help me in resolving this issue. In the registers window also, it is clearly seen that in the case of 135 IC, the SOC triggering is not happening, not only that even he ePWM is also not working for 135 IC, neither the ePWM is working nor the  GPIO is blinking, it seems like the main function is not even compiled as no function is working in there, whether it is the board_init from the syscfg or anything else. So, what should I do to resolve this isssue.


This is for the 39C IC, the TBCTR values are changing continuously as I've given sine wave as the counter compare value but this is also not happening in the case of 135 IC.
  • Hi Devesh,

    showing the epwm and adc output both but when I transfer it from 39C IC to 135 IC it is not showing any output even though it doesn't give any build error and also when I try to run the same project in the empty project for 135 IC, then it works properly, please help me in resolving this issue.

    When transfering to 135 IC, when you load the program and step through the code, does it get past board_init() and device_init()?  

    If it does, can you diff the PWM and ADC configurations between 135 IC and 39 IC? You can export the register values by right clicking on the register's view and exporting the register values.

    If those are the same, can you double check if the ADC input pins are selected properly in the sysconfig?

    Best,

    Ryan Ma

  • No, the code doesn't get past through board_init(), because if it would have gone past to that, then at least I would be able to see that ADC is being triggered through ePWM by seeing the ADCSOC7CTL in the registers window, but all of it are coming as zero, instead trigsel should be 101 which depicts that ePWM1 is used for triggering and similarly CHSEL should have value 00001, but nothing of it is coming which shows that this function is not being read by the microcontroller.

  • Hi Devesh,

    Do you know where in the board_init() the device is having an error? 

    Best,

    Ryan Ma

  • Hi Devesh,

    Please try to step through the code to see where in board_init() the program is failing. Provide screenshots of the CCS view so I can further help debug.

    Best,

    Ryan Ma

  • No, actually while transferring from one IC to another, even the device initialization is not happening at all which I checked by introducing the breakpoint just after the device_init() statement in the main function which is not identified by the code, and hence no data is shown in the registers as well as no GPIO is blinking in the microcontroller as well because the data is not being fed to the microcontroller. One probable reason for this can be that the sysconfig is not generating the device.c and device.h files from its own, they are added manually and from changing it from one IC to another, it's not letting me to exclude the device.c and device.h files, so that I can add these files again for new IC. I've tried reinstalling sysconfig multiple times but still it is not working, so what can be the reason for this and how to successfully migrate the project from one IC to another using two different sysconfig files.

  • Hi Divesh,

    Can you confirm if the IC that you have migrated to, when loading the program, branches to the main?

    If the device is being stopped during device init, it sounds like the device init routine is wrong. 

    Can you please provide any screenshots of the errors you are seeing within CCS? If this is a device initialization issue, please ensure that the clock settings are configured properly for the device you're migrating to. 

    Are you using SysConfig to generate the device.c and device.h files? Or are you using the provided device support files within the C2000WARE sdk?

    Best,

    Ryan Ma

  • Sysconfig is not generating the device.c and device.h file from its own, so I am using the device support files within the C2000WARE sdk, so it works for the IC for which I've imported the device support files  but when I change the syconfig file and try to run it for other IC by disabling the sysconfig file of the previous IC, it doesn't and also it's not allowing me to change the device support files and so I am unable to migrate it to another IC. There's no such errors I'm facing, I just introduced a breakpoint after the device_init() function in main file which is not getting identified by the controller so it means that it is not going through the device initialization and the code is not being fed to the IC

  • You can have SysCfg generate the device.c and device.h files by enabling the device support module.

    When you migrate to another IC using SysCfg, the device.c and device.h files will automatically get updated.

    Best,

    Ryan Ma

  • Okay, this is working the device files are getting generated, but I am getting the below debugging error while trying to debug it, can you help me with this.

  • Hi Devesh,

    It seems stuck in BootROM. Does the code properly jump to main before getting to this error? If so, can you share a screenshot of the call stack before the program ends up in bootROM?

    Please refer to our TRM Chapter to understand why BootROM may have been entered.

  • Just before the device_init() statement it is getting stuck and throwing this debugging error, so how to resolve this error. I've attached the registers window screenshot as well.

  • Hi Devesh,

    Can you outline the exact steps that is occuring? Are you able to load the program, and have the CPU be halted at main before clicking "Resume".

    I would double check the codestartbranch file to make sure everything is set up for F280013x.

    Best,

    Ryan Ma