cancel
Showing results for 
Search instead for 
Did you mean: 

Cant set any data in SDMMC register on STM32L496VGT

Luke Iliffe
Associate III
Posted on January 19, 2018 at 16:54

Hello everyone,

           I have a really weird issue with running an SD card on a STM32L496VGT. I can't seem to set any bit in any SDMMC registers. I've tried hard setting a value using my debug tool with the code paused before it gets to the DMA initialization and I cant even do that. I have looked at the disassembly to make sure that actual assembly generated by my test code which is trying to write 3 to the clock divide factor  does nothing (images of code attached). Has anyone seen this before or have any ideas what might be going on.

Thanks

Luke

#stm32l496 #sd-card
2 REPLIES 2
Posted on January 19, 2018 at 17:11

Really can't see attachments with current broken state of forum.

I have SDMMC running at quite high speeds on the STM32L4R9I-DISCO

Make sure all clocks are enabled (Bus + SDMMCCLK). Other STM32 platforms need PLL running for SDIO to function. The L4R9 has options HSI48 and PLLP, etc

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Luke Iliffe
Associate III
Posted on January 19, 2018 at 18:20

I've managed to get it working previously on the Neucleo L496ZG-P with the same STM32Cube settings so the code should have been ok, however having dug a bit at your suggestion I found that it was no longer enabling the clock and that had the weird effect of not allowing the RAM registers to be written. So good call on that. I still havent got everything working yet but at least the registers now make sence.