STR912, Port GCC and interrupt

damienhoyen wrote on Friday, July 11, 2008:

Hi every body,

Well, i m sticky with a GCC port and a interrupt (an RTC, from 2Hz to 128Hz) problem which reset my software.
For user of IAR, the GCC port seems be more or less the same as yours…

I m sure this interrupt is responsible of the crash because the interrupt frequency of this RTC is connected to the frequency of FreeRTOS reset.
On the same way, a disabling of this interrupt and the software runs without problem.

Important : The execution of the same interrupt in "FIQ Mode" runs without problem.

This interrupt is empty  : just clear and reenable, nothing else…

I’m supposing maybe something is wrong with the GCC interrupt management,
maybe in the FreeRTOS port task swap (GCC Port) or in the assembler file (CPSR register or macro Save-Restore Context)

If every body use interrupt on the STR91x port and GCC compilation, could you share with me your feedback.

Others ideas welcomed

Thanks in advance.

Damien

Context : FreeRTOS (5.0.0), GCC Yagarto, Eclipse, ARM9 STR912 and Board Olimex
To follow the following Thread : http://sourceforge.net/forum/forum.php?thread_id=2109568&forum_id=382005

damienhoyen wrote on Monday, July 14, 2008:

According to my 2nd thread,

I found the problem : This is a SPURIOUS interrupt problem.
Answer is given in the following document from ST: (thanks Anis)
http://www.st.com/stonline/products/literature/an/13715.pdf , page 11.

Because I hadn’t assigned a new default vector in the VIC0-1, during a spurious interrupt my software was branching to 0x00000000 means reset vector.

Just by adding following lines during the initialization of both VIC : everything seems fixed.

VIC0->DVAR = (u32)Dummy_Handler;
VIC1->DVAR = (u32)Dummy_Handler;

Damien