Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PIC32 PINGUIONO's and SD
06-05-2012, 11:30 AM, (This post was last modified: 06-05-2012, 12:01 PM by mf01.)
#40
RE: PIC32 PINGUIONO's and SD
I do hope so - I think this is one I want to get off Wink

So far we have assumed that the changes made in the various library files to account for the PIC32 Pinguino Micro are correct. Now I am not saying that they are incorrect but as I can't think of anything else I thought it was worth testing that assumption. I have looked at the various files in the SD library and the following following files contain explicit references to the Micro :-

fileio.c x1
fileio.h x1
sdmmc.c x2
sdmmc.h x 1

I had already found that the changes in fileio.c and fileio.h "broke" the SD library for the PIC32 Pinguino OTG. Looking more closely at the change in sdmmc.h, the change there appears to change fundamentally what SDCS is. Previously SDCS was, and for the OTG card still is, a global varibale which contains the SD card select Pin Number. However I think that line in sdmmc.h changes what SDCS is for the Micro. I beleive that the effect is to tell the pre-processor that wherever SDCS occurs to replace it with the number, i.e. it effectively stops SDCS acting as a variable.

Of the five changes identified above only the two in sdmmc.c are consistent with how the SD library works for the OTG board and deal with the fact that the SD card slot does not have the ability to detect card presence or the setting of the write protect tab. Even if the Micro does ignoring them should not stop the SD library from running. The actual line does however look odd and perhaps :-
Code:
#if defined (PIC32_PINGUINO_OTG) || (PIC32_PINGUINO_MICRO)
should be
Code:
#if defined (PIC32_PINGUINO_OTG) || defined (PIC32_PINGUINO_MICRO)
Therefore I have remmed (//) out the lines for the micro in fileio.c, fileio.h and sdmmc.h and changing the two line in sdmmc.c as above.

I have done this in the SD library folder on my r381 working copy.

I have also changed your test program slightly to include a few more "flashes", one before mount and two shorter after.

Attached is a zip file with my modified SD library folder and the versions of YellowWithMount.pde and SimplifiedLoggerExample03May2012.pde

I have compiled both .pdes on my working copy of X.3 r381 and run these on an OTG board with the expected results. The only differences between my working copy of r381 and the reference copy is the SD library folder. I have also compiled them for a Micro board with no compile errors. The only change you need to make both files is to change the value in SD.mount( ) to match the board you are using, 8 for the OTG and I think 40 ? for the Micro.

I will be interested to know your results and where the next station is Wink

Regards

Hi Dale,

what I forgot to include in files attached to my last post were the changes we made to fileio.c to deal with the lack of RTCC on the Micro board, so you will need to include those changes in order to get the SimplifiedLoggerExample03May2012 to run on the Micro - sorry for this omission.

*** I have now updated the attachment to include an updated fileio.c - it is slightly different from what we used previously as I have set the fixed date & time to 01 Jan 2012 12:00:00 and included a couple of comments.

Regards


Attached Files
.zip   TryThis.zip (Size: 56.19 KB / Downloads: 5)
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
PIC32 PINGUIONO's and SD - by KiloOne - 19-03-2012, 02:32 AM
RE: PIC32 PINGUIONO's and SD - by mf01 - 21-03-2012, 10:47 PM
RE: PIC32 PINGUIONO's and SD - by KiloOne - 22-03-2012, 08:17 AM
RE: PIC32 PINGUIONO's and SD - by mf01 - 22-03-2012, 08:27 PM
RE: PIC32 PINGUIONO's and SD - by KiloOne - 23-03-2012, 10:36 PM
RE: PIC32 PINGUIONO's and SD - by KiloOne - 02-05-2012, 02:34 PM
RE: PIC32 PINGUIONO's and SD - by mf01 - 02-05-2012, 04:08 PM
RE: PIC32 PINGUIONO's and SD - by KiloOne - 02-05-2012, 07:53 PM
RE: PIC32 PINGUIONO's and SD - by mf01 - 02-05-2012, 09:33 PM
RE: PIC32 PINGUIONO's and SD - by mf01 - 03-05-2012, 12:17 PM
RE: PIC32 PINGUIONO's and SD - by KiloOne - 03-05-2012, 04:35 PM
RE: PIC32 PINGUIONO's and SD - by KiloOne - 04-05-2012, 03:20 AM
RE: PIC32 PINGUIONO's and SD - by mf01 - 04-05-2012, 09:53 AM
RE: PIC32 PINGUIONO's and SD - by pingotg - 04-05-2012, 03:35 PM
RE: PIC32 PINGUIONO's and SD - by mf01 - 04-05-2012, 09:44 PM
RE: PIC32 PINGUIONO's and SD - by KiloOne - 04-05-2012, 11:25 PM
RE: PIC32 PINGUIONO's and SD - by mf01 - 05-05-2012, 12:23 AM
RE: PIC32 PINGUIONO's and SD - by KiloOne - 05-05-2012, 12:46 AM
RE: PIC32 PINGUIONO's and SD - by mf01 - 05-05-2012, 01:14 AM
RE: PIC32 PINGUIONO's and SD - by KiloOne - 05-05-2012, 01:27 AM
RE: PIC32 PINGUIONO's and SD - by mf01 - 05-05-2012, 10:58 AM
RE: PIC32 PINGUIONO's and SD - by KiloOne - 05-05-2012, 01:19 PM
RE: PIC32 PINGUIONO's and SD - by mf01 - 05-05-2012, 01:51 PM
RE: PIC32 PINGUIONO's and SD - by KiloOne - 05-05-2012, 02:36 PM
RE: PIC32 PINGUIONO's and SD - by mf01 - 05-05-2012, 04:51 PM
RE: PIC32 PINGUIONO's and SD - by KiloOne - 05-05-2012, 05:58 PM
RE: PIC32 PINGUIONO's and SD - by mf01 - 05-05-2012, 07:22 PM
RE: PIC32 PINGUIONO's and SD - by KiloOne - 05-05-2012, 08:04 PM
RE: PIC32 PINGUIONO's and SD - by KiloOne - 05-05-2012, 09:18 PM
RE: PIC32 PINGUIONO's and SD - by mf01 - 05-05-2012, 09:22 PM
RE: PIC32 PINGUIONO's and SD - by KiloOne - 05-05-2012, 10:37 PM
RE: PIC32 PINGUIONO's and SD - by mf01 - 05-05-2012, 11:01 PM
RE: PIC32 PINGUIONO's and SD - by KiloOne - 05-05-2012, 11:05 PM
RE: PIC32 PINGUIONO's and SD - by mf01 - 05-05-2012, 11:50 PM
RE: PIC32 PINGUIONO's and SD - by KiloOne - 05-05-2012, 11:57 PM
RE: PIC32 PINGUIONO's and SD - by mf01 - 06-05-2012, 10:42 AM
RE: PIC32 PINGUIONO's and SD - by KiloOne - 06-05-2012, 10:47 AM
RE: PIC32 PINGUIONO's and SD - by mf01 - 06-05-2012, 11:30 AM
RE: PIC32 PINGUIONO's and SD - by KiloOne - 06-05-2012, 02:01 PM
RE: PIC32 PINGUIONO's and SD - by mf01 - 06-05-2012, 03:30 PM
RE: PIC32 PINGUIONO's and SD - by KiloOne - 06-05-2012, 03:36 PM
RE: PIC32 PINGUIONO's and SD - by mf01 - 06-05-2012, 03:43 PM
RE: PIC32 PINGUIONO's and SD - by KiloOne - 06-05-2012, 03:53 PM
RE: PIC32 PINGUIONO's and SD - by mf01 - 06-05-2012, 05:41 PM
RE: PIC32 PINGUIONO's and SD - by KiloOne - 06-05-2012, 07:04 PM
RE: PIC32 PINGUIONO's and SD - by pingotg - 06-05-2012, 07:18 PM
RE: PIC32 PINGUIONO's and SD - by KiloOne - 06-05-2012, 07:41 PM
RE: PIC32 PINGUIONO's and SD - by mf01 - 06-05-2012, 07:57 PM
RE: PIC32 PINGUIONO's and SD - by KiloOne - 06-05-2012, 09:42 PM
RE: PIC32 PINGUIONO's and SD - by pingotg - 06-05-2012, 08:21 PM
RE: PIC32 PINGUIONO's and SD - by KiloOne - 06-05-2012, 08:39 PM
RE: PIC32 PINGUIONO's and SD - by pingotg - 06-05-2012, 08:47 PM
RE: PIC32 PINGUIONO's and SD - by KiloOne - 06-05-2012, 09:12 PM
RE: PIC32 PINGUIONO's and SD - by mf01 - 06-05-2012, 09:20 PM
RE: PIC32 PINGUIONO's and SD - by pingotg - 06-05-2012, 09:23 PM
RE: PIC32 PINGUIONO's and SD - by KiloOne - 06-05-2012, 09:27 PM
RE: PIC32 PINGUIONO's and SD - by pingotg - 06-05-2012, 09:30 PM
RE: PIC32 PINGUIONO's and SD - by mf01 - 06-05-2012, 09:39 PM
RE: PIC32 PINGUIONO's and SD - by mf01 - 06-05-2012, 09:47 PM
RE: PIC32 PINGUIONO's and SD - by KiloOne - 06-05-2012, 10:19 PM
RE: PIC32 PINGUIONO's and SD - by pingotg - 06-05-2012, 11:04 PM
RE: PIC32 PINGUIONO's and SD - by KiloOne - 06-05-2012, 11:53 PM
RE: PIC32 PINGUIONO's and SD - by pingotg - 07-05-2012, 12:09 AM
RE: PIC32 PINGUIONO's and SD - by KiloOne - 07-05-2012, 12:25 AM
RE: PIC32 PINGUIONO's and SD - by pingotg - 07-05-2012, 12:33 AM
RE: PIC32 PINGUIONO's and SD - by KiloOne - 07-05-2012, 12:34 AM
RE: PIC32 PINGUIONO's and SD - by mf01 - 07-05-2012, 09:09 AM
RE: PIC32 PINGUIONO's and SD - by pingotg - 07-05-2012, 09:43 AM
RE: PIC32 PINGUIONO's and SD - by KiloOne - 07-05-2012, 01:24 PM
RE: PIC32 PINGUIONO's and SD - by pingotg - 07-05-2012, 02:01 PM
RE: PIC32 PINGUIONO's and SD - by mf01 - 07-05-2012, 02:38 PM
RE: PIC32 PINGUIONO's and SD - by KiloOne - 07-05-2012, 03:28 PM
RE: PIC32 PINGUIONO's and SD - by mf01 - 07-05-2012, 04:05 PM
RE: PIC32 PINGUIONO's and SD - by KiloOne - 07-05-2012, 04:39 PM
RE: PIC32 PINGUIONO's and SD - by mf01 - 07-05-2012, 04:52 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)