Main Site Documentation

SD card and Cerb40


#1

Has anyone used Cerb40 with an SD card module? Has anyone used the Cerberus mainboard in the Gadgeteer designer and modified the driver (since the pin PA15 is NOT available on the Cerb40 but is on the Cerberus F socket).

What do people think are the best options here - rewrite the driver to not use the Socket, or create a mainboard with a virtual mapping of sockets/pins that goes back to whatever pin layout you choose? I started by thinking the former, modify module code to use cpu.pin references, but the SD card is one making me think that’s the wrong approach, use an approach like the G400HDR “mainboard” that @ Taylorza created.

edit: changed “latter” to say “former” which is what I meant.


#2

PA15? What am I missing. Glancing at my STM32F4 pinouts I think you need…

PC8 - SDIO_D0
PC9 - SDIO_D1
PC10 - SDIO_D2
PC11 - SDIO_D3
PB8 - SDIO_D4
PB9 - SDIO_D5
PC6 - SDIO_D6
PC7 - SDIO_D7
PC12 - SDIO_CLK
PD2 - SDIO_CMD


#3

So simplistically, the firmware on Cerberus family doesn’t need D4-D7, it’s all done in 4-bit mode. But the other pins are all available, for sure.

But the scenario I am talking about is this. You have an application that you’ve prototyped on a Cerberus device, using Gadgeteer. You aren’t going to make thousands of these devices, but you do want something more permanent. It would be nice to have a drop-in “module” solution to mount on a PCB with the connections and sensors you want. Cerb40 is the ideal form factor.

Since you want to continue developing your Gadgeteer application, you would need to support the same pinout that the F socket does on Cerb40. All the standard SD card pins are there, except for the PA15 pin which is an interrupt capable pin that is used for the SD card detection - it isn’t exposed on the Cerb40 at all. So to continue to use the SD card driver with Gadgeteer (which honestly reduces a number of complexities in the netmf persistentstorage class) you need to either replace the driver and change the pins used or you need to “redefine” the socket. This is the decision.


#4

@ Brett - as of today, this is a bit fragmented. The solution in your case would be not to use the gadgeteer driver. This way your code will be the same on both boards. I hope this can be handled better in the future.


#5

… the exact reason I posted the suggestion about making the Cobra2 SD card behave like an F socket.

So I now think the best solution is a community mainboard definition for Cerb40 that people can wire/rewire as they need. Expose a socket of each type, then people can (hard)wire the connections as they need. Looks like time to learn Wix :slight_smile:


#6

The Gadgeteer builder templates do it all for you, no need to learn Wix - so you can waste some more time understanding particle physics 101 :smiley: