Hi All,
I'm a new user of NXP's MCU. I want to use the SDSPI in MCUXpresso SDK API, but I don't know how to do the initial. The typical use case is written as below:
Hi Fei,
Please read the following documents in order to implement FatFs using SPI.
Porting FatFs file system to KL26 SPI SD card code
https://www.nxp.com/docs/en/application-note/AN10406.pdf
Regards,
Jing
Hi Jing,
Thank you for your kindly reply!
The tutorial you gave is really useful to implement FatFs using SPI. But my project developed on SDK 2.4.1, actually I don't need FatFs.
And the problem I met is when I used the SDSPI, I found in the function SDSPI_Init(card), the structure "card" is defined by struct "sdspi_host_t" and "sdspi_card_t". And I don't know how to connect to the SPI port: SPI1. I didn't find any information about it in Reference Manual.
I'm a new developer, appreciate any specific tips!
Thank you!
Best,
Fei
Hi,
You should initialize sdspi_card_t base on your card. The "sdspi_host_t" is initialize in fsl_sdspi_disk.c.
BOARD_SDSPI_SPI_BASE should point to the SPI peripheral you used. Define BOARD_SDSPI_SPI_BASE in board.h.
Regards,
Jing
Hi Jing,
Thanks! I'll have a try.
Best,
Fei