Hi,
We are using sllc469 for development of CANFD transmission and reception.
We are setting Nominal baud rate to 500kbps and Data baudrate to 2Mbps;
Case 1:
We are setting following values
MRAMConfiguration_before.SIDNumElements = 4; // Standard ID number of elements
MRAMConfiguration_before.XIDNumElements = 3; // Extended ID number of elements
MRAMConfiguration_before.Rx0NumElements = 2; // RX0 Number of elements
MRAMConfiguration_before.Rx0ElementSize = 0x07; // RX0 data payload size
MRAMConfiguration_before.Rx1NumElements = 2; // RX1 number of elements
MRAMConfiguration_before.Rx1ElementSize = 0x07; // RX1 data payload size
MRAMConfiguration_before.RxBufNumElements = 0; // RX buffer number of elements
MRAMConfiguration_before.RxBufElementSize = 0x07; // RX buffer data payload size
MRAMConfiguration_before.TxEventFIFONumElements = 0; // TX Event FIFO number of elements
MRAMConfiguration_before.TxBufferNumElements = 0; // TX buffer number of elements
MRAMConfiguration_before.TxBufferElementSize = 0x07;
TCAN4x5x_MRAM_Configure(&MRAMConfiguration_before); // Set up the applicable registers related to MRAM configuration
and we are enabling RXFIFO0 receive interrupt and RXFIFO1 receive interrupt
TCAN4x5x_MCAN_ConfigureInterruptEnable(0x00000011);
We are able to get nINT interrupt.
Expected data is received.
Case 2:
MRAMConfiguration_before.SIDNumElements = 0; // Standard ID number of elements
MRAMConfiguration_before.XIDNumElements = 0; // Extended ID number of elements
MRAMConfiguration_before.Rx0NumElements = 0; // RX0 Number of elements
MRAMConfiguration_before.Rx0ElementSize = 0; // RX0 data payload size
MRAMConfiguration_before.Rx1NumElements = 0; // RX1 number of elements
MRAMConfiguration_before.Rx1ElementSize = 0; // RX1 data payload size
MRAMConfiguration_before.RxBufNumElements = 0; // RX buffer number of elements
MRAMConfiguration_before.RxBufElementSize = 0; // RX buffer data payload size
MRAMConfiguration_before.TxEventFIFONumElements = 0; // TX Event FIFO number of elements
MRAMConfiguration_before.TxBufferNumElements = 2; // TX buffer number of elements
MRAMConfiguration_before.TxBufferElementSize = 0x07;
TCAN4x5x_MRAM_Configure(&MRAMConfiguration_before);
and disable all interrupt TCAN4x5x_MCAN_ConfigureInterruptEnable(0x00000000);
and sending data after every 15 msec
header.DLC = MCAN_DLC_64B; // Set the DLC to be equal to or less than the data payload (it is ok to pass a 64 byte data array into the WriteTXFIFO function if your DLC is 8 bytes, only the first 8 bytes will be read)
header.ID = 0x055; // Set the ID
header.FDF = 1; // CAN FD frame enabled
header.BRS = 1; // Bit rate switch enabled
header.EFC = 0;
header.MM = 0;
header.RTR = 0;
header.XTD = 0; // We are not using an extended ID in this example
header.ESI = 0;
if((MODE_PINS_AFTER & (REG_BITS_DEVICE_MODE_DEVICEMODE_NORMAL|REG_BITS_DEVICE_MODE_WD_CLK_40MHZ)) == (REG_BITS_DEVICE_MODE_DEVICEMODE_NORMAL|REG_BITS_DEVICE_MODE_WD_CLK_40MHZ))
{
TCAN4x5x_MCAN_WriteTXBuffer(1, &header, send_data); // This function actually writes the header and data payload to the specified TX Fifo number. It returns the bit necessary to write to TXBAR,
TCAN_BURST_READ(0X8158,&test_read,18);
TCAN4x5x_MCAN_TransmitBufferContents(1);
}
Case 3:
MRAMConfiguration_before.SIDNumElements = 4; // Standard ID number of elements
MRAMConfiguration_before.XIDNumElements = 3; // Extended ID number of elements
MRAMConfiguration_before.Rx0NumElements = 2; // RX0 Number of elements
MRAMConfiguration_before.Rx0ElementSize = 0x07; // RX0 data payload size
MRAMConfiguration_before.Rx1NumElements = 2; // RX1 number of elements
MRAMConfiguration_before.Rx1ElementSize = 0x07; // RX1 data payload size
MRAMConfiguration_before.RxBufNumElements = 0; // RX buffer number of elements
MRAMConfiguration_before.RxBufElementSize = 0x07; // RX buffer data payload size
MRAMConfiguration_before.TxEventFIFONumElements = 0; // TX Event FIFO number of elements
MRAMConfiguration_before.TxBufferNumElements = 2; // TX buffer number of elements
MRAMConfiguration_before.TxBufferElementSize = 0x07;
TCAN4x5x_MRAM_Configure(&MRAMConfiguration_before); // Set up the applicable registers related to MRAM configuration
TCAN4x5x_MCAN_ConfigureInterruptEnable(0x00000011);
If I place only Reception logic it works properly. If I add transmission logic, Data of all configure message IDs are receive once and then nINT interrupt is not coming, and data is not transmitting.
Thanks and regards
Vikas Gavhane