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.

TMS320F28379D: TMS320F28379D --sd card

Part Number: TMS320F28379D

Hello. I'm trying to implement reading and writing to the file located on the SD card. But I ran into the problem that the functions fatfs(f_opendir,f_readdir .......) return an error. I suspect that the fact is that the functions fatfs use GpioCtrlRegs which is not available in the CPU 2. How can I fix this?

  • It's quite possible that that's the issue. Have you observed the pins on a scope/logic analyzer? You could take the GPIO init code from the power_on() function in mmc_f2837x.c and move it to your regular GPIO initialization on CPU1.

    send_initial_clock_train() is maybe a little trickier although perhaps sending all 1s (which is what the code is already doing) is equivalent to switching the pin to a GPIO and holding it high for 10 bytes.

    Those appear to be the only two functions that use GpioCtrlRegs. For all other operations you just need to assign ownership of the SPIA and the relevant GPIOs to CPU2.

    Whitney