An issue with ARM interrupts revisits.

Sebastian Huber sebastian.huber at embedded-brains.de
Thu Nov 23 07:28:19 UTC 2017


On 22/11/17 07:33, Sebastian Huber wrote:
> I have absolutely no idea how you can end up in 
> _ARMV7M_Thread_dispatch() with an unexpected interrupt level.

I think if you call an operating system service which leads to a thread 
dispatch in a NMI handler, then you could end up with this situation. 
You can test this with the following patch and run the spintrcritical10 
test program.

diff --git 
a/c/src/lib/libbsp/arm/shared/armv7m/clock/armv7m-clock-config.c 
b/c/src/lib/libbsp/arm/shared/armv7m/clock/armv7m-clock-config.c
index 1c17a92cb5..f0ebe1506f 100644
--- a/c/src/lib/libbsp/arm/shared/armv7m/clock/armv7m-clock-config.c
+++ b/c/src/lib/libbsp/arm/shared/armv7m/clock/armv7m-clock-config.c
@@ -104,7 +104,7 @@ static void _ARMV7M_Systick_handler_install(void)
  {
    _ARMV7M_Set_exception_priority_and_handler(
      ARMV7M_VECTOR_SYSTICK,
-    BSP_ARMV7M_SYSTICK_PRIORITY,
+    1,
      _ARMV7M_Systick_handler
    );
  }

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.




More information about the users mailing list