Other Parts Discussed in Thread: SYSBIOS
Hi,
I have an interesting problem with the CAN controller on a F280049. I am using CAN controller 'A' connected using GPIO32 and GPIO18. Using the CAN controller without loopback I get no data from GPIO32/CANA_TX, however if I enable external loopback I can receive CAN messages externally on the PC using PCAN Explorer. I have checked the mux configuration for both GPIO18 and GPIO32 by looking directly at the mux registers and they are correctly configured. Given this information I know the following
1) Bit rate configuration is correct.
2) my code is sending packets and I can receive the packets correctly. Therefore the transmit path up to and including the CAN transceiver is working correctly.
Here is my test code I am using SYSBIOS but I believe this not to be relevant to this issue.
//CANA -> CAN0 Pinmux
GPIO_setPinConfig(GPIO_18_CANA_RX);
GPIO_setPinConfig(GPIO_32_CANA_TX);
//CAN0 initialization
CAN_initModule(CANA_BASE);
// Enable CAN test mode
CAN_enableTestMode(CANA_BASE, CAN_TEST_EXL);
// Refer to the Driver Library User Guide for information on how to set
// tighter timing control. Additionally, consult the device data sheet
// for more information about the CAN module clocking.
//
CAN_setBitRate(CANA_BASE, DEVICE_SYSCLK_FREQ, 125000, 10);
//
// Enable interrupts on the CAN peripheral.
//
CAN_enableInterrupt(CANA_BASE, CAN_INT_IE0 | CAN_INT_ERROR |
CAN_INT_STATUS);
//
// Enable the CAN interrupt signal
//
CAN_enableGlobalInterrupt(CANA_BASE, CAN_GLOBAL_INT_CANINT0);
//
// Enable auto-retry on CAN transmit.
//
CAN_enableRetry(CANA_BASE);
//
// Configure the message objects that are based on the device number.
//
CANDeviceNumSet(CAN_DEVNO_RMTPHS);
//
// Start CAN module A operations
//
CAN_startModule(CANA_BASE);
Any help would be appreciated.
Thanks,
Richard.