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.

TMS320F280025: DEVICE_DELAY_US

Part Number: TMS320F280025
Other Parts Discussed in Thread: C2000WARE

Hi

I am using F280025 in my project running @ 100MHz. I use DEVICE_DELAY_US to make a delay. I want to delay 300ms in my code DEVICE_DELAY_US(300000). I use scope to monitor the timing. It alway 5s ~ 20time longer.

I read some question in the forum, it seems that it need to run in RAM. I would like to know how to make sure it is run in RAM.

SysCtl_delay(((((long double)(300000)) / (1000000.0L /  \
                              (long double)((20000000U * 30) / (2 * 3 * 1)))) - 9.0L) / 5.0L)

I have a bootloader in Flash section 0 and application start @ Flash 0x7000

Below is my code for copy a Ram function

#ifdef OTA
// After moving to LO, ramfuncs begins 7 sectors lower
uint32_t loadStart = (uint32_t)&RamfuncsLoadStart - 0x7000;
memcpy(&RamfuncsRunStart, (const void*)loadStart, (size_t)&RamfuncsLoadSize);

loadStart = (uint32_t)&isrcodefuncsLoadStart - 0x7000;
memcpy(&isrcodefuncsRunStart, (const void*)loadStart,
(size_t)&isrcodefuncsLoadSize);

Please advise.