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.
Hello,
When I execute "DELAY_US()" in app running on FLASH, then code immediately jumps to ILLEGAL_ISR(). Instead, when I execute "DELAY_US()" in app running on RAM it works OK. I would like to be able to call "DELAY_US()" in app running on FLASH and make it work properly. I am using default linker command files (provided in controlSUITE).
Taking a look into linker command file, this routine is loaded into FLASH but executed in RAM.
Can anybody help please?
Thanks in advance!
Best regards,
Adria
Hi Adria,
Can you please refer to the C2000Ware Package?
Which project are you trying to run?
Thanks and Regards
Harshmeet
Hello Harshmeet,
Harshmeet Singh said:
Can you please refer to the C2000Ware Package?
I use controlSUITE package which contains C2000Ware. Routine "DELAY_US()" is in "F2837xD_usDelay.asm" (which can be found in path "ti/controlSUITE/device_support/F2837xD/v210/F2837xD_common/source/"). As linker command file I use "2837xD_FLASH_lnk_cpu1.cmd" (which can be found in path "ti/controlSUITE/device_support/F2837xD/v210/F2837xD_common/cmd/").
Harshmeet Singh said:
Which project are you trying to run?
I run my own project, for example, containing code below:
void main(void) { InitSysCtrl(); InitGpio(); DINT; IER = 0x0000; IFR = 0x0000; InitPieCtrl(); InitPieVectTable(); EnableInterrupts(); DELAY_US(1000000); // Delay 1 second while(1) { /* Do Nothing */ } }
This code perfectly works on RAM. Instead, when run on FLASH and reaches line "DELAY_US(1000000); // Delay 1 second" it jumps to ILLEGAL_ISR().
Best regards,
Adria
Hi Adria,
Some points here:
1. Are you using a flash linker command file?
2. There is a define _FLASH which copies time critical code and Flash setup code to RAM.
The DELAY_US() will be copied to RAM and you can run it in flash. It is in the F2837xD_SysCtrl,c File in the initSysCtrl Routine.
Please check if you are doing these.
Thanks and Regards
Harshmeet Singh
To verify that _FLASH define is being defined, I have checked, through the JTAG debugger, that "DELAY_US()" is being copied from FLASH to RAM within file "ti/controlSUITE/device_support/F2837xD/v210/F2837xD_common/source/F2837xD_SysCtrl.c".