Modify rpmsg-rpc-stress test to generate exceptions and watchdog timeouts
authorvwan@ti.com <vwan@ti.com>
Fri, 23 May 2014 21:40:15 +0000 (14:40 -0700)
committerRobert Tivy <rtivy@ti.com>
Wed, 28 May 2014 00:19:47 +0000 (17:19 -0700)
packages/ti/ipc/tests/rpc_task.c

index 1eca16e1d0657d8cd02862cf3d379e2415ccf4c5..190eb84f5bbeee4f4ae221f60333e3e2537f620a 100644 (file)
@@ -309,6 +309,7 @@ Int32 fxnFault(UInt32 size, UInt32 *data)
     Int a;
     typedef Int (*MyCode)();
     MyCode fxn = (MyCode)0x96000000;
+    volatile Int dummy = 0;
 
     a = (UInt32)payload[0].data;
 
@@ -325,6 +326,15 @@ Int32 fxnFault(UInt32 size, UInt32 *data)
             System_printf("Generating program MMU Fault...\n");
             fxn();
             break;
+        case 4:
+            System_printf("Generating exception...\n");
+            dummy = dummy / dummy;
+            break;
+        case 5:
+            System_printf("Generating Watchdog interrupt...\n");
+            dummy = 1;
+            while(dummy);
+            break;
         default:
             System_printf("Invalid fxnFault test\n");
             break;