cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to get FatFs with uSD card working on Nucleo-H7A3ZI-Q

magene
Senior II

I've built a simple STM32CubeIDE project with just the SDMMC1 peripheral mapped, a GPIO pin for the SD Detect pin and the FatFs middleware enabled with DMA per a discussion elsewhere on this forum. I have a Waveshare microSD card jumpered to what I'm pretty sure are the right pins on the Nucleo board. The program gets all the way to the f_mkfs call which eventually winds up calling HAL_SD_WriteBlocks_DMA which, if I understand correctly, is supposed to eventually fire the BSP_SD_WriteCpltCallback if it completes the write correctly. Unfortunately, that WriteCpltCallback never gets called and the calling subroutines eventually times out and I'm not sure what event or IRQ is supposed to fire the WriteCpltCallback

I have the Waveshare microSD card jumpered with 6" jumpers to the Nucleo board which possibly presents a signal integrity issue which prevents the WriteBlocks_DMA call from completing correctly. However, I have gotten the Waveshare board to work on a Nucelo413ZH with the same jumpering scheme.

I'm open to any suggestions. A FatFs example program that would work on this Nucleo board would also be greatly appreciated. And if it didn't have all the STM322 HAL overhead, so much the better.

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions

Hello @magene​ ,

Try to port the following example on your board (Path : Projects\STM32H743I-EVAL\Applications\FatFs\FatFs_uSD_DMA_Standalone)

It may help you.

BeST Regards,

Walid

View solution in original post

5 REPLIES 5

Hello @magene​ ,

Try to port the following example on your board (Path : Projects\STM32H743I-EVAL\Applications\FatFs\FatFs_uSD_DMA_Standalone)

It may help you.

BeST Regards,

Walid

magene
Senior II

@Walid ZRELLI​ Is the STM32H743I-Eval FatFs_uSD_DMA_Standalone you refer to a better example for the STM32H7A3-Nucleo than the STM32H7B3-Eval FatFs_uSD_DMA_Standalone example? I've been able to get the later one working on the B3-Eval board and it seems like the B3 example should work on the A3. Do I have that right?

Also, the NUCLEO-H7A3ZI-Q/FatFs_RAMDisk example works fine on the A3 Nucleo board. But it obviously doesn't test my connection to the external jumpered in uSD card proto board.

Thanks - Gene

Hello @magene​ ,

Of course, there is no problem if you choose to start with an example developed on the A3 board and move it to your B3 board.

The most important thing is to port the example correctly.

BeST Regards,

Walid

magene
Senior II

@Walid ZRELLI​ Thanks for the quick response. I'd just like to check a few things. My understanding is the B3 is basically an A3 with a crypto module, right? I reviewed the data sheet, reference and programming manuals, particularly the SDMMC peripheral and the DMA controller, and I couldn't find any differences that might affect a FatFs app. In particular, it looks like the DMA channels and streams are the same for the SDMMC on the B3 and A3. So, it looks to me like a FatFs example that works on the B3 should work on the A3 without any changes. Is that correct?

Yes, you are totally right.