• Yes, you're right - you should be able to share SPI. The only think I can think is that perhaps the SD card's CS pin gets left asserted, and so any further writes end up confusing it.

    What happens if you try accessing the SD card first with fs.readdir()? That should set up SPI as required for the card. Doing require('fs') doesn't automatically set anything up.

    Perhaps, if you don't set up SPI then it gets automatically set up in some way that it shouldn't be, and the fs module doesn't correct it.

    I've made a bug for this here: https://github.com/espruino/Espruino/issues/276

    As always, I've got a million things to do though so any help you could give that would help track this down would be good.

About

Avatar for Gordon @Gordon started