Other Parts Discussed in Thread: TM4C123GH6PM, SYSBIOS
Tool/software: TI-RTOS
How can I make a CAN bus interrupt using the TI RTOS? (MCU: TM4C123GH6PM, CCS: 7.0.0.43)
Without the RTOS my code would be the following:
// Set up CAN0 //I assume following lines to stay the same SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOB); // enable CAN1 GPIO peripheral GPIOPinConfigure(GPIO_PB0_CAN1RX); GPIOPinConfigure(GPIO_PB1_CAN1TX); GPIOPinTypeCAN(GPIO_PORTB_BASE, GPIO_PIN_0 | GPIO_PIN_1); SysCtlPeripheralEnable(SYSCTL_PERIPH_CAN0); CANInit(CAN0_BASE); CANBitRateSet(CAN0_BASE, sysClock, 1000000); //Here the Code has to be changed l. 1: CANIntRegister(CAN0_BASE, CANIntHandler); // use dynamic vector table allocation l.2: CANIntEnable(CAN1_BASE, CAN_INT_MASTER | CAN_INT_ERROR | CAN_INT_STATUS); l.3: IntEnable(INT_CAN0); //may stay the same CANEnable(CAN0_BASE);
The HWI may be configured in the **.cfg as follows:
ISR function: CANIntHandler
Interrupt Number: 55 //==CAN0_BASE
which replaces lines 1 and 3, but how may I replace line.2: "CANIntEnable(CAN1_BASE, CAN_INT_MASTER | CAN_INT_ERROR | CAN_INT_STATUS);" when using the **.cfg for configuring the HWI with TI-RTOS?