March 29, 2024, 12:12:21 AM

Pinguino micro SD card problem

Started by AnthonyP, February 12, 2014, 01:13:03 PM

Previous topic - Next topic

AnthonyP

Hello
I have the Pinguino micro pic32mx440f256h and cannot connect to the Sd card.
I have MPLAB X and X32 with pickit3 and can load hex, LEDs flash, Serial example works fine
Microchip SD examples fail at MDD Detect

I have Pinguino IDE and bootloader and can load sketch, flash LEDs, Serial example works fine
Pinguino micro Sd example fails at SD.mount(40)

Is there a way to check the board connections to the SD card?
Any suggestions how to check communication to SD card?

Thanks
Anthony

JohnS

May be a bug in the sample.  The board is probably fine.
You could try an older IDE, hoping to find a version that works.
You'd also do much better to use the Pinguino's own forum.

John

Lurch

The MCHP MDD software allows you to use a constant to avoid checking for the SDCard. You should look through the HardwareProfile (there are comments in the init routine of the code about this also).
I would just point them at a high pin or change the checking code.

AnthonyP

Hello John, thank you I will try an older version....

Hello Lurch, I have tried with CD and WE set in software....no success

Anthony

AnthonyP

Hello John,
Can you direct me to an older version of the SD library please I can only find x4
Thank you for your help.

Anthony

AnthonyP

Hello,
Could someone clear up for me the pins to the micro SD.
On my board CS is RF0 which is pic pin 58 and Pinguino micro pin 39?
What does Pinguino micro pin 40 RB13 do?
Also which file sets the SPI clock and data pins?
Thank you
Regards
Anthony

Lurch

The MCHP MDD stack uses SD_SPI.c and values in HardwareProfile.h to initialize and run the stack.
You need to look at those files.
RB13 is clearly marked on the schematic as the select pin for the SDCard's SPI (RG6, 7, 8)

AnthonyP

Hello Lurch,
The code hint about disabling the JTAG and then setting RB13 to output worked.
http://embeddedartists.wordpress.com/2013/03/08/problem-sd-card-setting-with-microchip-pic32-and-olimex-pic32-pinguino-otg/

You are right, RF0 is on the UEXT connector not the micro SD.
SD_SPI.c is altered to suit no CD or WE pins.....
I have the MPLAB X SD card examples working.

No joy with the Pinguino  SD examples yet....
Thank you for you comments..
Regards
AnthonyP