2018-01-19 07:54 AM
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-card2018-01-19 08:11 AM
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
2018-01-19 09:20 AM
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.