[FRDM-K32L2B3 board] Problem with SDSPI

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

[FRDM-K32L2B3 board] Problem with SDSPI

1,019 Views
Tantawat
Contributor I


Hello,

I using the FRDM-K32L2B3 board and IDE MCUXpresso.

I use this board and IDE at first time. I try sample program for i2c and another interface and it work well. But I have problem with SPI when using with SD card. The problems is as following:

1. I can't download sample program from SDK Builder, but I found sample program in this link https://mcuxpresso.nxp.com/api_doc/dev/1153/group__SDSPI.html#structsdspi__card__t
then, I download SDK from SDK Builder that not have sample program but have middleware for using SD card and can include fsl_sdspi.h. But sample program from above link don't have method to setting sdspi_card_t *card. So, I want details about setting this sdspi_card_t *card and full example of using SD card with FRDM-K32L2B3 board.

2.If I want to make SD card can use, in addition of coding do I have to configuration or setting anything?

3.In SDK Builder have sample program for SD card that use FreeRTOS but not support this board. So, I want to ask that it can't use FreeRTOS for coding SD card?

Other details about my project:
- microSDcard connect to FRDM-K32L2B3 with Interface SPI.


       BOARD                 SD card
PTC4 SPI0_SS ----------- CS
PTC5 SPI0_SCK --------- SCLK
PTC6 SPI0_MOSI ------- DI
PTC7 SPI0_MISO ------- DO

Board: FRDM-K32L2B

OS: Windows, Toolchain: MCUXpresso IDE

Components: FatFS, sdmmc stack

SDK Version: 2.9.0 (2021-01-15)

I don't care about SD card format (e.g. FAT). I only want to know how to make SD card can read/write.

Thanks.

0 Kudos
0 Replies