[STM32L476 Nucleo] SD Card...issues?

Discussion and questions about boards that can run MicroPython but don't have a dedicated forum.
Target audience: Everyone interested in running MicroPython on other hardware.
Post Reply
adinghi
Posts: 1
Joined: Thu Nov 16, 2017 8:32 pm

[STM32L476 Nucleo] SD Card...issues?

Post by adinghi » Thu Nov 16, 2017 8:57 pm

Does anyone have a working SDIO mode (not SPI) SD card with the L476 Nucleo? I've been finding that the SD card hangs uPython 1.9.3 on access, requiring a hard reset to recover. Attempting to boot from the SD card hangs before the virtual serial port gets working, and os.mount() hangs with no error message.

I've made an add-on board (FOSS, happy to post design if anyone is interested) which has an SD card socket, USB-OTG connector, etc. Attached to an L476 Nucleo, the SD card hangs; but when the same board is attached to an F446 Nucleo, the SD card works fine. Pin assignments are the same as on the PyBoard, and the card detect pin works with the L476...just not anything else with the card.

Compiling the SD code for the L476 was affected by a difference between HAL_SD_CardStateTypedef and HAL_SD_CardStateTypeDef in the HAL libraries, but changing the case of a D seemed to have fixed that.

Any hints or suggestions for debugging would be appreciated; I'm new to uPy development and still trying to get a clue.

Post Reply