[LPC55S6x] SD card SDK: call to f_open() stalls in OSA_SemaphoreWait

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

[LPC55S6x] SD card SDK: call to f_open() stalls in OSA_SemaphoreWait

230 Views
Alexander_42
Contributor I

I'm using the development board LPCXpresso55S69 with a LPC55S69 and a SD-card slot. The SDK example works fine and can read and write from and to the card. In my own project, while trying to read with f_open(), it stalls in the call to the semaphore wait method. Card inserting detection works as expected and the initialisation is - to my eyes - done exactly as in the SDK example "sdcard_fatfs_cm33_core0_sdcard".

Here is the call-stack where it just stops and waits for the semaphore getting free.

OSA_SemaphoreWait() at fsl_os_abstraction_bm.c:795 0x724a
SDMMC_OSAEventWait() at fsl_sdmmc_osa.c:69 0x2b74
SDMMCHOST_TransferFunction() at fsl_sdmmc_host.c:275 0x8ee6
SDMMC_Goldle() at fsl_sdmmc_common.c:117 0x909e
SD_Goldle() at fsl_sd.c:345 0x92a
SD_ProbeBusVoltage() at fsl_sd.c:1,944 0x25a0
sdcard_init() at fsl_sd.c:2,020 0x26c6
SD_Cardlnit() at fsl_sd.c:2,107 0x2816
SD_Init() at fsl_sd.c:2,290 0x2afa
sd_disk_initialize() at fsl_sd_disk.c:145 0x3344
disk_initialize() at diskio.c:117 0x911c
mount_volume() at ff.c:3,430 0x44ec
f_open() at ff.c:3,740 0x4baa

Any hints where I could search for the problem or which further information I could provide?

Thanks in advance,

Alex

Labels (1)
Tags (1)
0 Kudos
Reply
3 Replies

206 Views
Alexander_42
Contributor I

Further search revealed, that the interrupt SDIO_IRQHandler() does not fire. I use the standard SD_HostInit() to initialize the host, which subsequently calls SDIF_TransferCreateHandle() that should set up the interrupt. Still, there's something missing I can't locate in the (user-) code.

0 Kudos
Reply

188 Views
EdwinHz
NXP TechSupport
NXP TechSupport

Hi @Alexander_42,

Is there anything else on your code that might disable interruptions? You mention that you call the same initialization function "SD_HostInit()", but do you also make sure to initialize all the pins, clocks and other hardware necessary for the SD card to function properly on your application?

BR,
Edwin.

0 Kudos
Reply

84 Views
Alexander_42
Contributor I

Hi Edwin and thanks for your reply.

I compared the code flow between both projects, and everything looks identical. So, unless I did oversee something, the ports and timers should be set-up identical. The interrupt not coming in points to some set-up issue though, so I will double check, also with the HW monitors in MCUXpresso.

Best regards,

Alex

0 Kudos
Reply