I seem to have hit a bug in the Peripherals config tool. When I try and use the tool configure and initialize the FLEXCAN module using "Transfer" mode and if I select "Initialization of transfer callback" and enter the Transfer function callback name of "flexcanCallback", the tool creates the following prototype in peripherals.h:
/***********************************************************************************************************************
* Callback functions
**********************************************************************************************************************/
/* FlexCAN transfer callback function for the FlexCAN_1 component (init. function BOARD_InitPeripherals)*/
extern void flexcanCallback(CAN_Type *, flexcan_handle_t *, status_t , void *);
but in fsl_flexcan.c the driver's call is as follows:
/* Calling Callback Function if has one. */
if (handle->callback != NULL)
{
handle->callback(base, handle, status, result, handle->userData);
}
Notice that the prototype has 4 parameters, but the actual call has 5 arguments. I manually edited peripherals.h to add uint32_t parameter between the status_t and void* (4th position). Then my code compiles and runs fine.
The KSDK shows up in MCUXpresso as version 2.4.2 and manifest version 3.3.0. MCUXpresso is version 10.2.1_795.
Is this a bug, or have I failed to keep MCUXpresso in sync with my installed SDK? What should I be doing to avoid this type of situation?
Hi Jeffery,
Yes, I agree with you. It's a bug. I'll report it.
Thank you very much!
Regards,
Jing