• 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:

    1. SD Specifications - Part 1 - Physical Layer - Simplified Specification - Version 4.10
    2. Reading SD cards with the STM32F4-Discovery
    3. Micro SD Data Sheet
    4. Secure Digital Card Interface for the MSP430 - Dept. of Electrical and Computer Engineering, Michigan State University

    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:

      'SD' :  { 'pin_cs' :  'D7',
                'pin_di' :  'B5',
                'pin_do' :  'B4',
                'pin_clk' :  'B3' },
    

    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","hell­o");
    =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!

    Thanks again for all your help @Gordon.

About