cancel
Showing results for 
Search instead for 
Did you mean: 

STM32N6 USING SD CARD

HMTb
Associate II

Hi everyone,

I’m asking for your help with accessing my SD card. I’m running into an issue with the STM32N6DK750 Discovery Kit and would really appreciate some advice.

I’m trying to write data to an SD card using FileX and ThreadX. Everything compiles and debugs fine, but nothing actually gets written to the card.

I also tried the FX_MultipleAccess example provided by ST, but it doesn’t compile. I’ve tried fixing several compilation errors, but some declarations are missing, like byte_pool in app_filex.c.

I’m not sure what’s causing the issue, and I’m wondering if I might have missed an important step or misconfigured something.

1 ACCEPTED SOLUTION

Accepted Solutions
HMTb
Associate II

I found the issue: the SD card I was using did not support FAT32, which prevented any files from being written.

I replaced it with a 16GB SD card, and now everything works perfectly.

Thanks !

View solution in original post

5 REPLIES 5
mƎALLEm
ST Employee

Hello @HMTb and welcome to the ST community,

May be better to you is to start with / refer to the example provided in the N6 HAL package:

https://github.com/STMicroelectronics/STM32CubeN6/tree/main/Projects/STM32N6570-DK/Applications/FileX

Edit: why that example doesn't compile? how you did download the package? from Github or from this link?

if from Github you need to clone with recursive option. Please read this article:

Downloading STM32Cube packages from GitHub correctly

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

Thank you for your welcome and guidance.

I actually generated the example using CubeMX, but I don’t understand why some data appear to be missing after generation—it seems a bit strange.

I also cloned the GitHub repository as you suggested, and in that case, it compiles correctly. However, when I run the code on the board via CubeIDE <just to test whether anything is actually written to my SD card before using CubeProgrammer with the trusted binary>, the code runs fine on the board.

The problem is that when I remove the SD card and check it on my PC, I don’t see any files, the card appears empty.

I’m not sure why this happens and would really appreciate any advice on why the SD card remains empty even though the code executes correctly on the board.

Thank you in advance for your help!

I'm not file system expert but I didn't understand this sentence:

"The problem is that when I remove the SD card and check it on my PC, I don’t see any files, the card appears empty." please clarify so at least others can help you efficiently. Why you need to see the files in your PC if the SD card is removed?

 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

Sorry, let me clarify, after flashing and running the application on the board, I  removed the SD card from the board’s SDMMC slot. I then inserted the SD card into my PC using an external card reader to inspect its contents.

However, when I mount the SD card on my computer, no files or directories are visible. The SD card appears empty, as if no data had been written to the filesystem.

HMTb
Associate II

I found the issue: the SD card I was using did not support FAT32, which prevented any files from being written.

I replaced it with a 16GB SD card, and now everything works perfectly.

Thanks !