Hello,
I am very new in TI-RTOS. I want to add a CAN interrupt handler to my testing system.
I started with an empty example from "Resource Explorer" of Code Composer Studio 6.1.1.00022.
I initialized CAN device. When I send a CAN message from my PC to TM4C based target device, Interrupt from CAN is activated.
I can know this because there is an error saying that system cannot find ISR. This is the error message on a console when I send a CAN message to the target.
[CORTEX_M4_0] Starting the example
System provider is set to SysMin. Halt the target to view any SysMin contents in ROV.
ti.sysbios.family.arm.m3.Hwi: line 1269: E_noIsr: id = 56, pc = 00005cc8
Exception occurred in background thread at PC = 0x00005cc8.
Core 0: Exception occurred in ThreadType_Task.
Task name: {unknown-instance-name}, handle: 0x20003498.
Task stack base: 0x20001580.
Task stack size: 0x800.
R0 = 0x00005cc9 R8 = 0xffffffff
R1 = 0x200034e4 R9 = 0xffffffff
R2 = 0x00000000 R10 = 0xffffffff
R3 = 0x00007563 R11 = 0xffffffff
R4 = 0x00000000 R12 = 0x00000000
R5 = 0x0000918c SP(R13) = 0x20001d50
R6 = 0xffffffff LR(R14) = 0x00006429
R7 = 0xffffffff PC(R15) = 0x00005cc8
PSR = 0x21000000
ICSR = 0x00423838
MMFSR = 0x00
BFSR = 0x00
UFSR = 0x0000
HFSR = 0x00000000
DFSR = 0x00000000
MMAR = 0xe000ed34
BFAR = 0xe000ed38
AFSR = 0x00000000
Terminating execution...
This is the setting for CAN ISR in empty.cfg.
/* ================ Driver configuration ================ */
var TIRTOS = xdc.useModule('ti.tirtos.TIRTOS');
TIRTOS.useGPIO = true;
var hwi0Params = new Hwi.Params();
hwi0Params.instance.name = "hwi0";
Program.global.hwi0 = Hwi.create(40, "&testInterruptHandler", hwi0Params);
And This is the ISR named testInterruptHandler.
Void testInterruptHandler(UArg arg0)
{
System_printf("Testing Interrupt Handler\n");
/* SysMin will only print to the console when you call flush or exit */
System_flush();
}
Can you give me an advise to solve this problem?
Regards,
Young