How to use MCAN_TransferCreateHandle(CAN_Type *base,mcan_handle_t *handle,mcan_transfer_callback_t callback,void *userData)

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

How to use MCAN_TransferCreateHandle(CAN_Type *base,mcan_handle_t *handle,mcan_transfer_callback_t callback,void *userData)

1,076 次查看
zhaojianzhi
Contributor II

Dear Sir,

    Could you kindly help explain this Function how to use in MSCAN Init?

 MCAN_Init(EXAMPLE_MCAN, &mcanConfig, MCAN_CLK_FREQ);

 MCAN_TransferCreateHandle(EXAMPLE_MCAN, &mcanHandle, mcan_callback, NULL);

I found that this function is after MCAN_Init.It seems that this function install a interrupt call back for projce.

I'm very confuse abut this.pls help me.thks a lot.

0 项奖励
回复
1 回复

918 次查看
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Tony,

 MCAN_TransferCreateHandle(EXAMPLE_MCAN, &mcanHandle, mcan_callback, NULL); is used to install callback function, but the callback function is NOT interrupt service routine(ISR), callback function is called in ISR, in general, in the ISR, check if the predefined number of data have been transferred completely, if it has transferred the predefined number of data, callback functioin is called, if it has NOT transferred the predefined number of data, callback funjctioiin is not called.

Hope it can help you

BR

XiangJun Rong

0 项奖励
回复