CAN TX (event) FIFO example

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

CAN TX (event) FIFO example

1,184件の閲覧回数
janoene
Contributor I

Hi all,

I'm experimenting with CAN on a LPCXpresso54628 development kit (with can board attached). Sending and receiving via interrupts is working, but I want to make use of the fifo's for transmitting. 

I read the user manual, but it is still not clear to me how it should be working. 

I initialized the fifo's and event fifo's with the peripheral configuration tool. When sending a message I assume it should work after calling MCAN_WriteTxBuffer and MCAN_TransmitAddRequest. My callback function is called with status 6216 twice and 6217 afterwards in some sort of loopback. 

Does anyone has any idea what is going wrong? Is there some sort of example available or more documentation on (event) fifo's for transmitting?

 

thanks in advance!

0 件の賞賛
返信
1 返信

1,168件の閲覧回数
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Jan,

Regarding your question, as you know for CAN Transmitter, there are Four mechanism: Tx buffer, Tx FIFO, TX Queue and TX Event FIFO. For the first three mechiansm, you can use the void MCAN_SetTxBufferConfig(CAN_Type *base, const mcan_tx_buffer_config_t *config) function to allocate memory and initialize.

For the Tx Event FIFO mechanism, you have to use the void MCAN_SetTxEventFifoConfig(CAN_Type *base, const mcan_tx_fifo_config_t *config) to allocate memory and initialize.

Furthermore, the Tx message buffer start address is dependent on the mechanism, pls be careful to calculate the start address for the Tx buffer, Fifo, queue and event fifo, which take effect on the MCAN_WriteTxBuffer().

 

Hope it can help you

BR

XiangJun Rong

0 件の賞賛
返信