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

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

744 Views
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 Kudos
Reply
1 Reply

586 Views
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 Kudos
Reply