MCUXpresso config tool, bug found

Discussion created by mmlee on Jan 23, 2019
Latest reply on Jan 30, 2019 by mmlee

I found the following bug in MCUXpresso config tool v5, peripheral v.5.



When generating code for the SAI peripheral, using "Record and playback" setting, it ends up generating code which uses the Tx handler for the Rx.


In the SAI_1_init(void), the peripherals.c SAI_RxInit() should use the SAI_1_Rx_handle, instead of the SAI_1_Tx_handle. Generated by MCUXpresso config tool look at line 12 vs 14.

sai_handle_t SAI_1_Tx_handle;
sai_handle_t SAI_1_Rx_handle;

void SAI_1_init(void) {
/* Configure SAI_1_rx_config.bclkSource in case of synchronous mode with second (Tx/Rx) part is selected. */
SAI_1_rx_config.bclkSource = SAI_1_tx_config.bclkSource;
/* Initialize SAI Tx sub-module functionality */
SAI_TxInit(SAI_1_PERIPHERAL, &SAI_1_tx_config);
/* Initialize SAI Rx sub-module functionality */
SAI_RxInit(SAI_1_PERIPHERAL, &SAI_1_rx_config);
/* Create the SAI Tx transfer handle */
SAI_TransferTxCreateHandle(SAI_1_PERIPHERAL, &SAI_1_Tx_handle, callback, NULL);
/* Create the SAI Rx transfer handle */
SAI_TransferRxCreateHandle(SAI_1_PERIPHERAL, &SAI_1_Tx_handle, callback, NULL);
/* Initialize SAI Tx transfer format */
/* Initialize SAI Rx transfer format */


The config page:



The configs doesn't seem to matter, the generated code always seems to use the Tx handle instead of Rx handle.