sipeed / Maixduino

Arduino port on Maix board ( k210 )
https://maixduino.sipeed.com
Other
213 stars 93 forks source link

Example sketch "ReadWrite" not working with Maixduino - example "Cardinfo" works fine #98

Closed Birk-maker closed 3 years ago

Birk-maker commented 3 years ago

Trying to run example sketches from the Arduino framework on a Maixduino board I just bought using the PlatformIO IDE. All of the SD(k210) examples, such as "ReadWrite", fail except "Cardinfo" which works fine. The failing examples all indicate "initialization failed" when they call "SD.begin(29)". The "Cardinfo" example (which works ) is the only one which does not use the SD commands. I've tried 4 different SD cards ranging from 2 GB to 32GB and there is no difference. All cards were FAT formatted on a Windows laptop. Because the "Cardinfo" example works I tend to think the Maixduino board and the SD cards are ok. Does anyone have an idea why I can't get the SD examples to work? I'm out of ideas.

Thanks!

Birk-maker commented 3 years ago

This has been solved. The problem is that the PlatformIO IDE currently uses the Maixduino framework version 0.3.9 - which has a problem with the SD init. The solution is to use framework version 0.3.11. To pull in this version to PlatformIO put the following into the Platform_packages option: "platformio/framework-maixduino @ https://github.com/sipeed/Maixduino.git"