Keil™, An ARM® Company

Discussion Forum

ARM: STM32, still problems with isr_* calls?

Next Thread | Thread List | Previous Thread Start a Thread | Settings

DetailsMessage
Read-Only
Author
Ben Rathke
Posted
15-May-2008 17:24
Toolset
ARM
New! ARM: STM32, still problems with isr_* calls?

Hello - I'm writing a simple usart console application using RTX with MDK-ARM v3.20 on an MCBSTM32. The code ends up in either MemManage_Handler or HardFault_Handler when setting an event via isr_evt_set in the interrupt that services the USART. I get the same result when running the MCBSTM32\RTX_Traffic example, which is similar to my application. Is there anyone out there running this example successfully? Thanks -

Read-Only
Author
F D
Posted
21-May-2008 11:35
Toolset
ARM
New! RE: ARM: STM32, still problems with isr_* calls?

Hi Ben,

I am not familiar with your specific board and processor but I can probably give you some ideas where to look for possible problems.

Do you allow nested interrupts?

If yes, don't use isr_evt_set; instead use os_evt_set. The reason is that allowing nested interrupts, you switch back into user/system mode! The problem with this situation is that you may force a task switch in your interrupt handler and start the waiting task. Your interrupt will only finish after the related task is finished.

I would start with non-nested interrupts using isr_evt_set and once this is working you can switch to nested interrupts if this is really necessary.

Frank

Read-Only
Author
Robert Rostohar
Posted
21-May-2008 22:38
Toolset
ARM
New! RE: ARM: STM32, still problems with isr_* calls?

Frank,

Inside STM32 device is a Cortex-M3 (not ARM7/9) which has a completely different Interrupt system. There is no User or System mode but Thread and Handler mode.

Normal code runs in Thread mode and Handler mode is entered as a result of an exception/interrupt (also true for nested interrupts). Therefore nested interrupts should not be the reason for the problem that Ben reported. Also the mentioned RTX_Traffic example doesn't use nested interrupts.

Ben,

I see no problems when running RTX_Traffic on MCBSTM32. You should send the description on how to duplicate the problem with RTX_Traffic to support.intl@keil.com

Read-Only
Author
Ben Rathke
Posted
22-May-2008 08:43
Toolset
ARM
New! RE: ARM: STM32, still problems with isr_* calls?

Thanks for your responses. I'll continue as suggested.

Next Thread | Thread List | Previous Thread Start a Thread | Settings