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.

TMS320F280049C: Copying the Interrupt Vectors tms320f280049c

Part Number: TMS320F280049C
Other Parts Discussed in Thread: C2000WARE

Hello,

I read the document "running_application_from_internal_flash_tms320f28xxx.pdf" and everything is clear so far. 

But one section confuses me: 4.1 Copying the Interrupt Vectors 

Here it says you need to do sth linke 

/*** Initialize the PIE_RAM ***/
 PieCtrlRegs.PIECTRL.bit.ENPIE = 0; // Disable the PIE
 asm(" EALLOW"); // Enable EALLOW protected register access
 memcpy((void *)0x000D00, &PieVectTableInit, 256);
 asm(" EDIS"); 

Now I am using the newest C2000 Ware as a reference and I did not see sth. comparable.

I copied my ti rampfunctions like: 

#ifdef _FLASH
//
// Copy critical sections to in linker command file defined sections.
// Critical sections can be defined via __attribute__((ramfunc)) or #pragma
//
memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (size_t)&RamfuncsLoadSize);

// Initialization of flash waite states. Wait states has been selected
// according to CPUCLK and choise of external osci
Flash_initModule(FLASH0CTRL_BASE, FLASH0ECC_BASE, DEVICE_FLASH_WAITSTATES);
#endif

But now I wonder if I also need to copy my interrupt vectors, or where it is done. I am using the interrupt.c file.

Furthermore, my watchDogTimeOut routine is placed on flash, if I got the map file right. 

Can I speed up the handling of my interrupt routines by placing the routine on ram e.g. with __attribute__((ramfunc)) (pretty silly question, I guess yes couse zero wait states)?

Thanks in advance.

Best wishes

Jan

  • Hi Jan,

    Please go through the e2e post here.

    e2e.ti.com/.../878674

    Our Flash expert has put together this post and it explains in details with last C2000ware example, tips & tricks.

  • Hello Santosh,

    first off all, thanks for your fast reply.

    Unfortunatly, there is nothing new to me in that post. I guess the simple answer to:

    I reffer to 4.1 Copying the Interrupt Vectors  in "running_application_from_internal_flash_tms320f28xxx.pdf", why I do not need to copy that vectors or if it is done somewhere and i just did not see it. 

    And if ISR should be placed on ram or if the advantage is negligible.

    Best wishes,

    Jan

  • Jan,

    Are you using DriverLib based example? Please check Device_init() function in main.

  • Yes, I do. And I checked all the code, and I got confused why in the previous mentioned pdf they copy the interrupt Vectors and this is not done in the ne C2000 driverlib. The routine work fine, but still it is a little bit fuzzy and confusing to me reading about copying interrput verctors. 

  • Jan,

    If you have gone through the link I mentioned before, then it is explained in section 5 to 8.

    5. .TI.ramfunc section is mapped to a Flash address for “Load” and a RAM address for “RUN” in the Flash based linker command file.

    6. All the sections mapped to Flash are aligned on a 128-bit boundary using ALIGN() directive in the Flash based linker command file.

    7. memcpy() function is called in the application to copy the .TI.ramfunc content from Flash to RAM. memcpy() is called before executing any code that is assigned to .TI.ramfunc section.

  • For sure I read this and like I said, this part is understood and working. Like I told you my your reply.

    Copying the post highlighted in red won't help. 

    This did not help, I think we are just not on the same page here. 

    Thanks you, I will do a little deeper research on my own and contact our field engineer.