MCUXpresso config tool, bug found

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

MCUXpresso config tool, bug found

849 Views
mmlee
Contributor II

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 */
 SAI_TransferTxSetFormat(SAI_1_PERIPHERAL, &SAI_1_Tx_handle, &SAI_1_tx_format, SAI_1_TX_MCLK_SOURCE_CLOCK_HZ, SAI_1_TX_BCLK_SOURCE_CLOCK_HZ);
 /* Initialize SAI Rx transfer format */
 SAI_TransferRxSetFormat(SAI_1_PERIPHERAL, &SAI_1_Rx_handle, &SAI_1_rx_format, SAI_1_RX_MCLK_SOURCE_CLOCK_HZ, SAI_1_RX_BCLK_SOURCE_CLOCK_HZ);
}

The config page:

pastedImage_1.png

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

2 Replies

687 Views
jch
NXP Employee
NXP Employee

Hi mmlee,

thanks a lot for reporting this issue, in the attachment is the corrected version of

patch for MCUXpresso IDE 10.3.x and MCUXpresso Config Tools v5.

Content of the archive should be extracted into the tool's data folder, which is:
on Windows: c:\ProgramData\NXP\mcu_data_v5
on Linux/Mac: /home/<USER>/.nxp/mcu_data_v5

After extracting the data into the above folder MCUXpresso Config Tools has to be restarted.

We are sorry for inconvenience caused by this issue.

Have a nice day

Jiri

687 Views
mmlee
Contributor II

Thanks a lot, this fixed the code!

0 Kudos