Since my last post I delved right down into the SD specification to try and figure out what should be happening. I found a few particularly helpful posts and documents that I'd like to share here for others having similar problems:
and it even got me ferreting through the C code ;)
Thanks to reference #2 above I found out what should be happening with the card detect (CD) pin when the card is put into the slot. Everything was in order.
Still no joy!
For some reason I decided to use another set of pins and see what happened. This is the current standing of the SD definition block in boards/STM32F4DISCOVERY.py:
I connected her up, ran my command and this is what I got:
>var f = require("fs").readFile("test.txt");
="hello\n\n"
followed by a write just to make sure it really was working:
>var f = require("fs").writeFile("blah.txt","hello");
=true
So I'm not quite sure what is wrong with the other set of pins but at least it is now working and I have learnt a bunch of stuff I never thought I'd have to!
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Well what do you know, it is working! :)
Wandering in the wilderness
Since my last post I delved right down into the SD specification to try and figure out what should be happening. I found a few particularly helpful posts and documents that I'd like to share here for others having similar problems:
and it even got me ferreting through the C code ;)
Thanks to reference #2 above I found out what should be happening with the card detect (CD) pin when the card is put into the slot. Everything was in order.
Still no joy!
For some reason I decided to use another set of pins and see what happened. This is the current standing of the SD definition block in
boards/STM32F4DISCOVERY.py
:I connected her up, ran my command and this is what I got:
followed by a write just to make sure it really was working:
So I'm not quite sure what is wrong with the other set of pins but at least it is now working and I have learnt a bunch of stuff I never thought I'd have to!
Thanks again for all your help @Gordon.