I am learning how to program a ATSAMC21J18A MCU, and so far, I have managed to properly write an I2C initialization and Read/Write Transmission code on the register level, things like below...
SERCOM5->I2CM.ADDR.reg = 0x16;
SERCOM5->I2CM.DATA.reg = 0x44;
I am now trying to do a CAN Extended ID transmit and receive by writing the code on a register level as well, things like below...
CAN0->CCCR.reg |= CAN_CCCR_INIT;
CAN0->XIDFC.bit.LSE = 0x00;
So now, I have roughly wrote the CAN initialization code, but the datasheet does not say clearly which registers should I put the Extended Address for Receiving messages, or also where should I put the data for Transmitting.
I am lost on the Tx/Rx FIFO and Message RAM as well, where to put the Address and Data etc.
Could someone guide me on the steps involved or a certain link for a tutorial on this topic?
Thanks in advance...