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.

TMS320F28386D: CM DEVICE_DELAY_US time half

Part Number: TMS320F28386D
Other Parts Discussed in Thread: C2000WARE

Hi,

I test for the gpio led blinky by the example "C:\ti\c2000\C2000Ware_3_02_00_00\driverlib\f2838x\examples\c28x_cm\led\led_ex1_c28x_cm_blinky_cpu1.c and led_ex1_c28x_cm_blinky_cm.c" .

In the cm, I find out DEVICE_DELAY_US(500000) timer delay was wrong. It shoud be 500ms, but the gpio signal in Oscilloscope was only 250ms.

I have tried several time delay and all of them are half time.

How to fix it?

Thanks

  • Hi Frederick,

    We have already fixed this issue in the the 3.03 version. The macro was developed assuming it is run from SxRAM, which is 2x slower than CxRAM. 

    We have updated the macros and are using CxRAM for running the delay function in both RAM and Flash configs.

    Regards,

    Veena

  • Hi Veena,

    Which file should I replace from C2000Ware 3.03?

    In the .map file, the SysCtl_delay() function is in the FLASH section instead of RamFuncs

    Thanks

  • We are making this function run from RAM in Flash configuration as well. We load the code in Flash but copy it in CxRAM. I believe this was present in the 3.02 version as well. If not, please use the latest sysctl.h file

    Also, please use the updated cm.h file (contains the updated definition for DEVICE_DELAY_US macro) and the linker command file (in which ramfuncs are always mapped to CxRAM)

    Regards,

    Veena