Olimex Support Forum

DUINO => PINGUINO => Topic started by: AnthonyP on February 12, 2014, 01:13:03 PM

Title: Pinguino micro SD card problem
Post by: AnthonyP on February 12, 2014, 01:13:03 PM
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
Title: Re: Pinguino micro SD card problem
Post by: JohnS on February 12, 2014, 03:25:11 PM
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
Title: Re: Pinguino micro SD card problem
Post by: Lurch on February 12, 2014, 04:26:31 PM
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.
Title: Re: Pinguino micro SD card problem
Post by: AnthonyP on February 12, 2014, 11:02:34 PM
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
Title: Re: Pinguino micro SD card problem
Post by: AnthonyP on February 14, 2014, 09:50:06 AM
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
Title: Re: Pinguino micro SD card problem
Post by: AnthonyP on February 17, 2014, 09:33:11 AM
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
Title: Re: Pinguino micro SD card problem
Post by: Lurch on February 17, 2014, 02:49:04 PM
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)
Title: Re: Pinguino micro SD card problem
Post by: AnthonyP on February 18, 2014, 01:46:34 PM
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