This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi, TI experts
I have a question need to distinguish.
I want to implement FreeRTOS-Plus-FAT + SD card on AM2432 of M4 core.
I can setup with sysconfig. When I compiler the project, there is no lib at freetos_fat directory.
Does this mean m4 core not support FreeRTOS-Plus-FAT + SD?
Thanks for your help!
Hi Ray Huang,
We don't support FreeRTOS+FAT+SD on M4 core out of box. Although theoretically it is possible. I will assign the thread to RnD team who can give more details on how to enable the support for the same.
Best Regards,
Aakash
Hi Aakash Kedia,
Thanks for your reply.
I will try it by myself, and hope to recevie the support form the RnD team.
Hi Ray,
As Aakash mentioned. Currently we don't have plan to support the FATFS on M4 core. Can you please share more details on why this is needed on M4 core instead of using R5 core?
Regards,
Ankur
Hi Ankur Brarnwal,
In my plan, I decide M4 core can be in charge of some slow actions.
Like Modbus communcation, log file write to SD Card, CANOPEN communcation.
So, I need the FATFS on M4 core.
Thanks for your help.
Hi Ray,
You need to build the FATFS library on M4. Let us know if are unblocked here
Regards,
Ankur
Hi Ankur Brarnwal,
I had tried the demo "mmcsd_file_io_am243x-evm_r5fss0-0_nortos_ti-arm-clang", it worked fine.
Then I modified this project, I remove the "freertos_fat.am243x.r5f.ti-arm-clang.debug.lib" from this project as below.
I add the fs folder into this project, and I exclude from build these folder and files as below.
When I rebuild this project, I got these errors as below.
When I did the same procedures on M4, I got the same error messages.
Could you help me to reslove this problem?
Thanks for your help!
Hi Ankur Brarnwal,
I had resolved the "mmcsd_file_io_am243x-evm_r5fss0-0_nortos_ti-arm-clang" project which I remove the "freertos_fat.am243x.r5f.ti-arm-clang.debug.lib" form this project.
I exculde the "ff_locking.c" from build. The project can be bulid success. Then the project can be run at R5f0_0.
I repeat the same procedure as above into m4 mcu.
The compiler can build the project success.
But when m4 cpu runs the program, it will stop at below. (I used online debug to trace code.)
else if(phyType == MMCSD_PHY_TYPE_SW_PHY)
{
/* Enable Output Tap Delay and select the Output Tap Delay */
CSL_REG32_FINS(&ssReg->PHY_CTRL_4_REG, MMC_SSCFG_PHY_CTRL_4_REG_OTAPDLYENA, 1U);
CSL_REG32_FINS(&ssReg->PHY_CTRL_4_REG, MMC_SSCFG_PHY_CTRL_4_REG_OTAPDLYSEL, 2U);
}
Is there anything to be modified?
I am glad to hear your reply.
Hi Ankur Brarnwal,
I had tried to change the register address as below.
.ctrlBaseAddr = CSL_MMCSD1_CTL_CFG_BASE + 0x80000000UL,
.ssBaseAddr = CSL_MMCSD1_SS_CFG_BASE + 0x80000000UL,
It was RAT memory as below.
After I done this procedure, the program on M4 can run to MMCSD_getModeSd() at MMCSD_initSD().
I trace the code with online debug. I can pass the MMCSD_SD_CMD(0) to MMCSD_SD_ACMD(6).
I can get the sd card reponse signal, I think the register address is correct.
But why it stop at MMCSD_getModeSd().
Please help to resolve this probem, thanks any way.
Best Regard,
Ray Huang
Hi Ankur Brarnwal,
I had compare the the code excute between R5F and M4. I found an error.
R5f: presentstate will always mentain 0x01F70000
M4: after excute MMCSD_SD ACMD(51) presentstate will change to 0x01F70206
So the program will stop at here
while(CSL_REG32_FEXT(&pReg->PRESENTSTATE, MMC_CTLCFG_PRESENTSTATE_INHIBIT_DAT) != 0U);
Is this harward problem?
The sd card is the same.
Please check this problem!
Thanks any way!
Hi Ray,
There is no support planned for FAT-FS on M4 core.
Regards,
Ankur