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 -

Parents
  • 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

Reply
  • 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

Children
More questions in this forum