CCS: Version: 6.1.3.00033
tirtos_tivac_2_16_01_14
xdctools_3_32_00_06_core
CPU: Tiva TM4C1290NCPDT
I have gotten the many other devices working on my CPU board and am now trying to get the CAN interface working.
I'm setting up an HWI for vector 38.
Then I call "CanInit(CAN0_BASE)" and it crashes with the following:
[CORTEX_M4_0] ti.sysbios.family.arm.m3.Hwi: line 1095: E_hardFault: FORCED
ti.sysbios.family.arm.m3.Hwi: line 1172: E_busFault: IMPRECISERR: Delayed Bus Fault, exact addr unknown, address: 40040020
Exception occurred in background thread at PC = 0x00023250.
Core 0: Exception occurred in ThreadType_Task.
Task name: XXX, handle: 0x20001090.
Task stack base: 0x200010e0.
Task stack size: 0x800.
R0 = 0x40040000 R8 = 0xffffffff
R1 = 0x00000001 R9 = 0xffffffff
R2 = 0x00000000 R10 = 0xffffffff
R3 = 0x0001be6d R11 = 0xffffffff
R4 = 0xffffffff R12 = 0x2003d94c
R5 = 0xffffffff SP(R13) = 0x20001820
R6 = 0xffffffff LR(R14) = 0x0000f84f
R7 = 0xffffffff PC(R15) = 0x00023250
PSR = 0x21000000
ICSR = 0x00425803
MMFSR = 0x00
BFSR = 0x86
UFSR = 0x0000
HFSR = 0x40000000
DFSR = 0x00000001
MMAR = 0x40040020
BFAR = 0x40040020
AFSR = 0x00000000
Disassembly for that location shows:
CANInit():
0002324c: 2101 movs r1, #1
0002324e: 6001 str r1, [r0]
$C$L50:
00023250: 6A02 ldr r2, [r0, #0x20]
00023252: 0C12 lsrs r2, r2, #0x10
00023254: D2FC bhs $C$L50
00023256: 22B0 movs r2, #0xb0
I am executing this PINMUX code for SSI0 (prior to CANInit()):
//
// Configure the GPIO Pin Mux for PA4
// for SSI0XDAT0
//
MAP_GPIOPinConfigure(GPIO_PA4_SSI0XDAT0);
MAP_GPIOPinTypeSSI(GPIO_PORTA_BASE, GPIO_PIN_4);
//
// Configure the GPIO Pin Mux for PA5
// for SSI0XDAT1
//
MAP_GPIOPinConfigure(GPIO_PA5_SSI0XDAT1);
MAP_GPIOPinTypeSSI(GPIO_PORTA_BASE, GPIO_PIN_5);
//
// Configure the GPIO Pin Mux for PA3
// for SSI0FSS
//
MAP_GPIOPinConfigure(GPIO_PA3_SSI0FSS);
MAP_GPIOPinTypeSSI(GPIO_PORTA_BASE, GPIO_PIN_3);
//
// Configure the GPIO Pin Mux for PA2
// for SSI0CLK
//
MAP_GPIOPinConfigure(GPIO_PA2_SSI0CLK);
MAP_GPIOPinTypeSSI(GPIO_PORTA_BASE, GPIO_PIN_2);
Is there something that has to be initialized prior to calling CANInit() that I am missing?