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.

[Tms320F2812] illegal_isr problem with 2812 and CCS3.1

Other Parts Discussed in Thread: TMS320F2812

Dear,

I'm facing a problem when working with TMS320F2812 and CCS3.1.

My program compile and work perfectly, then I write more a function which do nothing:

first_order_innertia()

{

// Do nothing

}

The function do nothing.

Then compiling is 0 error - 0 waring but when running (RAM H0) the pointer jump to illegal_isr.

I've read some topic and document (sprc430d), I know what happening when this isr occur. I check the .map file, all the section is not overflow, my stack is 0x400 (I increased stack size but it stays the same).

I guess it's problem of setting up the cmd linker file or collision of memory, not the algorithm because the function do nothing.

If you faced this problem, please show me the solution or some suggestions, I want to know more clearly about this problem because handle memory is very important.

You can reply in this thread or give me some hints to email: nguyen.kirk.die@gmail.com

Thank a lot!

Best regards,

  • Instead of writing the ffirst_order_inertia() function, i do algorithm in mainISR function (dont use function), everything works fine but I can't understand the problem i face ahead! Is there any suggestion for this?

    Thank a lot!

    best regards,

  • Hi,

    if I got you right, the program rises an illegal instruction exception when you add the function call within the mainISR code.
    If the ISR is written using hand coded assembler language check if the stack pointer has the correct alignment upon the function call. If the alignment is not on an even address boundary, at the function return the wrong address will be popped from stack causing the illegal op trap.