]> wirehaze git hosting - stm32f411ceu6.git/blobdiff - sys/core/kentry.c

wirehaze git hosting

panic ()
[stm32f411ceu6.git] / sys / core / kentry.c
index 7fcc4b8a1abb06ffc330ad7859a8eadf845ec73a..c78af6b3468d25420ca8c793b37a5f9f2308c67a 100644 (file)
@@ -20,14 +20,14 @@ kentry (void)
 {
   unsigned int line;
 
-  /*  Test UART and LED  ----------------------------------------------------  */
+  for (line = 0; line < sizeof text / sizeof *text; ++line)
+    kputs_busytc (text[line]);
+
+  /* Trigger a fault to test kernel panic  */
+  asm ("udf #0");
+
+  kputs_busytc ("Unreachable");
 
   while (1)
-    {
-      for (line = 0; line < sizeof text / sizeof *text; ++line)
-        {
-          kputs_busytc (text[line]);
-          led_toggle ();
-        }
-    }
+    asm ("wfi");
 }