2023-05-14 07:14 PM - edited 2023-11-20 05:31 AM
Hello,
I'm using NucleoU575 with CubeMx and I want to make a file system on my SD card.
I want to use FreeRtos but there are no Fatfs in CubeMx and the FileX cannot work with FreeRtos (image). Is there anyway i can use Fatfs with STM32U5 ?
Thank you.
Solved! Go to Solution.
2023-05-14 07:42 PM
I had this same problem. Luckily I found it pretty easy to port FatFS over the the STM32U5. Just create a a new project in CubeMX using a microcontroller that *does* support FatFS. In my case I created a project using the STM32L4R9ZG. Then I copied all the FATFS files and directories over to my STM32U5 project. From there its pretty much a simple matter of changing all the header file references from STM32L4R9 device to STM32U5.
For my project I'm using a STM32U575RIT6 with a SD card interface. I was able to get everything working with FatFS and the SDMMC bus in 4 bit mode
2023-05-14 07:42 PM
I had this same problem. Luckily I found it pretty easy to port FatFS over the the STM32U5. Just create a a new project in CubeMX using a microcontroller that *does* support FatFS. In my case I created a project using the STM32L4R9ZG. Then I copied all the FATFS files and directories over to my STM32U5 project. From there its pretty much a simple matter of changing all the header file references from STM32L4R9 device to STM32U5.
For my project I'm using a STM32U575RIT6 with a SD card interface. I was able to get everything working with FatFS and the SDMMC bus in 4 bit mode
2023-05-15 09:46 AM
Thank you very much, @Community member
2023-05-20 12:29 PM - edited 2023-11-20 05:32 AM
I added STM32F4 Fatfs files and It can work.
I share my code for the NUCLEO-U575 to everyone who needs in the file attached here.
1/ I used this SPI driver for the sd card : https://www.micropeta.com/video29
2/ I copied the FATFS files from a CubeMX project for STM32F4 then modify to the U5
I also need these two files from F4:
3/ You need to add some path to your project (see image)
4/ Don't forget to add this if you use the same SPI driver as mine. You also need the change SPI_FLAG_TXE to SPI_FLAG_TXP in "fatfs_sd.c"
2023-05-20 05:19 PM
2024-03-03 02:57 PM
Use ThreadX RTOS instead. You can then enable FileX normally.