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,054件の閲覧回数
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 返信

896件の閲覧回数
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 件の賞賛
返信