Other Parts Discussed in Thread: CONTROLSUITE, TMS320F28377S
Tool/software: TI C/C++ Compiler
Hello there,
With the #pragma function on 320f28335, we were running the functions we wanted to run fast through RAM, in our previous post we said that we could do this in the following way;
1. I did not find a specific document for this feature, yet. Nevertheless it is not very complicated to do use it. The example flash_f28335 (C:\ti\controlSUITE\device_support\f2833x\v133\DSP2833x_examples_ccsv4) uses this feature.
In main the function to copy the code from flash to ram is called:
MemCopy(&RamfuncsLoadStart, &RamfuncsLoadEnd, &RamfuncsRunStart);
You also need to specify which functions should be executed from RAM:
#pragma CODE_SECTION(epwm1_timer_isr, "ramfuncs");
#pragma CODE_SECTION(epwm2_timer_isr, "ramfuncs");
The ramfuncs section need to be created in the linker command file:
ramfuncs : LOAD = FLASHD,
RUN = RAML0,
LOAD_START(_RamfuncsLoadStart),
LOAD_END(_RamfuncsLoadEnd),
RUN_START(_RamfuncsRunStart),
PAGE = 0
2. There are obviouse disadvantages like a longer startup time for the application because the memcopy needs to be executed and you also need the free space in the RAM.
Im not aware of other critical disadvantages of this feature.
3. When you have compiled your project the linker generates a .map file. In this file the usage of the different ram and flash regions is listed.
At the above mentioned example I can see that the ramfuncs need 0x5d byte in RAM and are stored and executed in RAML0 at address 0x8000.
ramfuncs 0 00320000 0000005d RUN ADDR = 00008000
00320000 0000003e Example_2833xFlash.obj (ramfuncs)
0032003e 0000001b DSP2833x_SysCtrl.obj (ramfuncs)
00320059 00000004 DSP2833x_usDelay.obj (ramfuncs)
What are the requirements for the TMS320F28377s?