Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problems with PIC32-PINGUINO OTG SD card
18-04-2012, 06:42 PM, (This post was last modified: 20-04-2012, 10:10 AM by mf01.)
#2
RE: Problems with PIC32-PINGUINO OTG SD card
Hi Togz,

unfortunately the SD library in the x.3 branch appears to have been broken when support for the PIC32 Pinguino Micro was added at the end of March :-(.

Luckily it is not too difficult to "patch" the files to get it working again.

*** Update 20 Apr 2012 ***

Do NOT re-instate the #defines in the sdmmc.h file that have been commented out for the PIC32 Pinguino and PIC 32 Pinguino OTG boards.

Checking on the PIC32 Pinguino OTG schematic Pinguino Pin 13 is used not only by LED1, the green LED, but also for SD/MMC Pin 5 so using it as a Read or Write LED is likely to interact (probably unfavourably) with reading or writing data.

*** End of 20 Apr 2012 update ***

Firstly make sure that you have the latest version of the file:-

/p32/include/pinguino/libraries/sd/scmmc.h

(it was updated in r336/13 April 2012 to remove a spurious second "*/" at the end of the first multi-line comment at the start of the file.

Look in the folder that has all the Pinguino files and find the following files :-

/p32/include/pinguino/libraries/sd/fileio.c
/p32/include/pinguino/libraries/sd/fileio.h

In BOTH files change the line :-
Code:
#if !defined (PIC32_PINGUINO) && !defined (PIC32_PINGUINO_OTG) && !defined (PIC32_PINGUINO_MICRO)
to read
Code:
#if !defined (PIC32_PINGUINO_MICRO)

The line is line 41 in fileio.c and line 55 in fileio.h.

There is also an incorrect type declaration in in the DataLogger.pde example. This does stop the program from compiling or running but would be best to correct. In DataLogger.pde change the line that reads :-
Code:
int             i, b, l, btw, bw, br;
to read:-
Code:
UINT             i, b, l, btw, bw, br;

As noted above with the first change the DataLogger.pde compiles OK on my Ubuntu system, although there are some warnings in the stdout file. The change to the DataLogger.pde file noted above gets rid of some of the warnings (but not all of them :-( ) but they do not stop the program from compiling and running OK.

Regards
Board = PIC32-Pinguino-OTG Rev C
OS = Linux Unbuntu 11.10 till 26 Apr 2012
OS = Linux Unbuntu 12:04 from 27 Apr 2012
Reply


Messages In This Thread
Problems with PIC32-PINGUINO OTG SD card - by togzball - 18-04-2012, 06:06 PM
RE: Problems with PIC32-PINGUINO OTG SD card - by mf01 - 18-04-2012, 06:42 PM
RE: Problems with PIC32-PINGUINO OTG SD card - by togzball - 19-04-2012, 04:04 AM
RE: Problems with PIC32-PINGUINO OTG SD card - by togzball - 19-04-2012, 02:46 PM
RE: Problems with PIC32-PINGUINO OTG SD card - by togzball - 19-04-2012, 11:49 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)