ARM Cortex M3 Interrupt

fkln wrote on Tuesday, July 17, 2007:

I’m working with the actual version of FreeRTOS and gcc.
Because I want to use a bootloader, I have moved the start address to a higher address (0x0000 0800). If there are only a interrupt every second, the program runs without any problems. If I start an additional data transfer with a UART (interrupt driven), the program stops working.
If the program starts at adress 0x0000 0000 all works well.
The only difference between this two programs is the Linker Command file and the programming of the Interrupt Base Address register.

Are there any special instructions regarding the Interrupt Service Routines (or any other ideas what is going wrong) ?

Thanks,

Klaus

jorick23 wrote on Tuesday, July 17, 2007:

What processor are you using?

sotd wrote on Tuesday, July 17, 2007:

Can you move it like this on an M3?  I thought 0 contained the stack address, and the next address the vector table.  I did not know you could move it, but I am not an expert on the M3.

Do you programs run with this address when you are not using FreeRTOS?

jorick23 wrote on Tuesday, July 17, 2007:

Now I see it.  It was in the title.  Sorry.

fkln wrote on Tuesday, July 17, 2007:

The processor is a Luminary Micro LM3S828. The stack address is at 0x0000 0000 and the Reset Vector is at 0x0000 0004.
With the Linker Command file, I move the program stack to 0x0000 0800 and the Reset Vector to 0x0000 0804. The bootloader programs the Vector Table Offset Register (0xE000 ED08) to 0x800 and the bootloader reads and programms the new stack and jumps to the address of the new Reset Vector.

I only work with FreeRTOS, so I am not sure if it is really a problem with the interrupts

Klaus

fkln wrote on Wednesday, July 18, 2007:

Now, I have compiled the application with the IAR compiler. With this version, the Synchronous Serial Communication works well but there are problems with the UART communication.
In contrast to the GCC version, if there is a error in the UART communication in IAR version the rest of the program works without any problems.

Klaus

fkln wrote on Wednesday, July 18, 2007:

Is it possible, to use nested interrupts in FreeRTOS ?

If it is not possible, this could be a reason for my problem. The Cortex M3 has a Nested Vectored Interrupt Controller which improve the Interrupt handling.

http://www.arm.com/products/CPUs/ARM_Cortex-M3_NVIC.html

Klaus

rtel wrote on Wednesday, July 18, 2007:

Sorry for an abrupt answer, rather busy just at the moment.

The M3 port permits nested interrupts.  You have to take care about the priority of interrupts that use the FreeRTOS.org API.  The latest version also permits interrupts that run above the kernel interrupt priority.

Take a look at the FIQ on interrupts (noting that the M3 *does* permit nesting).


Regards.

fkln wrote on Wednesday, July 25, 2007:

Hi all,

after I have changed the C-Compiler from gcc to IAR all works well. I think it is a gcc problem, because another version of the application withut FreeRTOS is also not running.

Klaus