Shop OBEX P1 Docs P2 Docs Learn Events
Propeller ASC+ microSD Card Issues — Parallax Forums

Propeller ASC+ microSD Card Issues

scociobascocioba Posts: 19
edited 2018-02-19 03:07 in General Discussion
Hi Everyone,
I'm trying my hardest to get the microSD reader onboard the ASC+ to work in SPIN. When I run the "01 SD Card Test" or any other piece of demo code from parallax I keep getting the following in the serial terminal:

SD engine started.
Disk IO Error
Disk IO Error
Filename=
Disk IO Error
File opened.
File closed.
Partition unmounted.

I'm using a FAT32 formatted SD card with a capacity of 32gb (Samsung EVO Select microSD HC).

I can open and access the card via a card reader on my laptop and it seems fine. Nothing is written to the card during the demo program run either. Could any give me some leads or link me to some sample code that should just run a simple demo? I need to log some data for a research project and this is the last hurdle to overcome. Any help would be greatly appreciated!

Comments

  • Just a guess - try formatting fat not fat32.

    Tom
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2018-02-19 03:42
    If it reads ok in the PC then it probably is fine and doesn't need to be reformatted. Do you have anything plugged into J1 as those pins are shared with the SD card. Check against the schematic.
  • Cluso99Cluso99 Posts: 18,069
    Some of the SD drivers didn't support FAT32. So I would try reformatting with FAT16 and see how that goes.

    Kye's FAT driver supports FAT32 but is pedantic that everything is correct. There is sample code that should test the SD card.

    My Prop OS uses a slightly modified Kye's driver and works with FAT32 and SDHC cards.

    Both the above will require pin changes and recompilation to test the SD card.
  • scociobascocioba Posts: 19
    edited 2018-02-19 14:39
    According to the wiring schematic for the ASC+, I set the SD-MMC-FATEngine pin constants to the following:

    https://pasteboard.co/H8nb8WQ.png
    https://pasteboard.co/H8nblCU.png

    But I keep getting the same IO error when running the serial terminal to see the SD Engine results. No clue how to remedy this. Has anyone got the SD card working on the ASC+?

    I have nothing else connected to the board, btw.

    ASC+ Schematic link here: http://1mgh.com/w/images/d/de/Pasc-f.pdf
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2018-02-19 15:08
    scocioba wrote: »
    According to the wiring schematic for the ASC+, I set the SD-MMC-FATEngine pin constants to the following:

    https://pasteboard.co/H8nb8WQ.png
    https://pasteboard.co/H8nblCU.png

    But I keep getting the same IO error when running the serial terminal to see the SD Engine results. No clue how to remedy this. Has anyone got the SD card working on the ASC+?

    I have nothing else connected to the board, btw.

    ASC+ Schematic link here: http://1mgh.com/w/images/d/de/Pasc-f.pdf

    There is nothing unusual about the ASC+ SD circuit so I would try a different card and maybe even an old 2GB card which is normally formatted to FAT16. If you happen to have a 4 or 8G SDHC formatted to FAT32 then I would give that a go. I know my Tachyon software works with all kinds of cards including 32GB and 64GB SDHC with FAT32.

    The only thing worse than sitting around trying to guess what is wrong is when you can't try anything or do anything about it.

  • Cluso99Cluso99 Posts: 18,069
    Just a thought..
    Are DI & DO swapped?
  • Hi Everyone,
    So I managed to get the ASC+ to work with the SD card using Greg's Object (http://obex.parallax.com/object/33) instead of a chop shop rendition of the BoE exercises. I followed the ASC+ schematic and wrote in the proper pins for the CLK, DI, DO, and CS pins. Had to also hard code the FAT32 option at the bottom in the DAT region...this detail took me an hour to find. Now everything works well. The next and hopefully last issue has to do with this odd rounding or truncated data coming from the jm_freqin library. Need to do frequency counting but when converting to a string I find I only get certain levels of values instead of a continuously changing precision number. Anywho gonna make this another post so I don't mix things up. Thanks for all your help and support!!!!
  • Cluso99Cluso99 Posts: 18,069
    Pleased you have it working now :)
  • For future reference, I use the ASC+ with Tomas Rokicki and Jonathan Dummer's FSRW 2.6 object. FSRW uses Dummer's SafeSPI object. The only time I have had trouble is when the SD card is bad or I do something like forget to set the clock speed.
Sign In or Register to comment.