I want to use the classic CAN communication in the cortex-A4.
First I set the parameters in CPU1.
// Allocate MCAN (a shared peripheral) to cortex-A4 (C28x)
SysCtl_allocateSharedPeripheral(SYSCTL_PALLOCATE_MCAN_A,0x1U);
// Configure the divisor for the MCAN bit-clock
SysCtl_setMCANClk(SYSCTL_MCANCLK_DIV_4);
// Configuring the GPIOs for MCAN.
GPIO_setPinConfig(GPIO_10_MCAN_RX);
GPIO_setPinConfig(GPIO_4_MCAN_TX);
Then, I configure the parameters in Cortex-A4.
// Switching on the peripheral.
CM_init();
// Reset the peripheral.
SysCtl_resetPeripheral(SYSCTL_PERIPH_RES_MCAN_A);
// CrossBar and ISR Configuration.
MCANIntrConfig();
//
// Configure the MCAN Module.
MCANConfig_Simple();
In the MCANConfig_Simple() function, I referred to the project examples(mcan_ex7_classic_transmit.c) of CPU1 that configured the MCAN to classic CAN. The bit time settings are listed as follows: //
// Initialize bit timings.
bitTimes.nomRatePrescalar =0x3U; // Nominal Baud Rate Pre-scaler.
bitTimes.nomTimeSeg1 =0x9U; // Nominal Time segment before SP.
bitTimes.nomTimeSeg2 =0x8U; // Nominal Time segment after SP.
bitTimes.nomSynchJumpWidth =0x8U; // Nominal SJW Range.
However, It doesn't work. I guess that the baud rate of the MCAN is not configured properly, however, I can not find some useful references.
So please help me about the use of MCAN as classic CAN in Cortex-A4.
And aso I want to ask that if MCAN is configured to CANFD, if the CAN monitor card must support the CANFD communication?
Thank you very much !