Hello,
I'm using a custom board with a evkmimxrt1170_lvgl_guider_bm_cm7 example project modified and working with our screen. Also got working a evkmimxrt1170_sai_cm7 example project with a codec and a speaker. Both projects are working OK separately with some modifications in code.
Now I'm facing some problems with the integration of SAI module on the lvgl guider project.
Comenting the init code of SAI, the screen is working OK, but when I try the code of SAI module, I only can get working comenting the LVGL code and changing the memory mapping.
This is the memory mapping for a screen visualization:
For get the SAI code working, I need to move the SRAM_DTC_cm7 to the first RAM position:
I think I'm having a cache/allocation problem with some variables.
This is the build of the audio code:
This one is with both screen and audio code, with an overflow:
And this is changing the order in memory, compiling OK but audio not working:
More information:
When I debug the SAI code with the LVGL memory mapping, I get stucked when reproducing audio on RecordSDCard function, because when txCallback is called the I2S structure has value 0, and the variables on the previous function are lost.
Variables and I2C values before callback:
After callback:
Could you give me some information about what's happening?
Thank you very much!
Hi @daniJVV,
I would highly recommend using the SLN-TLHMI-IOT example codes as reference, since these codes already implement LVGL and SAI features on the i.MX RT1170, and do a proper handling of the memory map that you can refer to. You can find the example codes on the following GitHub: GitHub - NXP/mcu-smhmi
BR,
Edwin.