micropython / pyboard

The MicroPython board
Other
518 stars 167 forks source link

MicroSD card switch connection #10

Closed charlespax closed 9 years ago

charlespax commented 9 years ago

I made a copy of the pyboard from the schematic in github, but it would not boot from the SD card. I found an inconsistency between the github schematic and the actual micropython board I purchased.

The PYBv1.0 schematic has the MicroSD card switch connected to PA8 (pin41). screen shot 2015-04-30 at 01 23 39

The schematic in Eagle has the MicroSD card switch connected to PC13 (pin2). screen shot 2015-04-30 at 01 21 54

charlespax commented 9 years ago

micropython/stmhal/boards/PYBV10/pins.csv has SD and SD_SW both defined at PA8. screen shot 2015-04-30 at 13 48 53

charlespax commented 9 years ago

If I change the MICROPY_HW_SDCARD_DETECT_PIN and load the modified firmware to my board the SD/flash booting works as expected.

bash-3.2$ git diff
diff --git a/stmhal/boards/PYBV10/mpconfigboard.h b/stmhal/boards/PYBV10/mpconfigboard.h
index ef4ad10..bd53a22 100644
--- a/stmhal/boards/PYBV10/mpconfigboard.h
+++ b/stmhal/boards/PYBV10/mpconfigboard.h
@@ -53,7 +53,7 @@
 #define MICROPY_HW_LED_OFF(pin)     (pin->gpio->BSRRH = pin->pin_mask)

 // SD card detect switch
-#define MICROPY_HW_SDCARD_DETECT_PIN        (pin_A8)
+#define MICROPY_HW_SDCARD_DETECT_PIN        (pin_C13)
 #define MICROPY_HW_SDCARD_DETECT_PULL       (GPIO_PULLUP)
 #define MICROPY_HW_SDCARD_DETECT_PRESENT    (GPIO_PIN_RESET)
chrismas9 commented 9 years ago

The Eagle schematic is for pybv3. There were only 10 hand made boards as early bird prizes. The pdf schematic and the rest of the documentation are for pybv10, the production board. There are other port pin changes as well as SD card switch.

There are separate images available for download for pybv3 and pybv10. Today they are pybv10-2015-04-30-v1.4.2-48-g6f218d7.dfu and pybv3-2015-04-30-v1.4.2-48-g6f218d7.dfu.

If you made your own board from the Eagle schematics and want to build Micro Python from source then make it for the pybv3 board.

charlespax commented 9 years ago

Oh boy. I probably should have read the README.md file; it's right there :-)

I'll just redesign my board based on the pybv10 PDF. Are the (Altium?) source files available for the pybv10 board?

charlespax commented 9 years ago

@chrismas9 resolved the confusion. Closing issue.