Closed charlespax closed 9 years ago
micropython/stmhal/boards/PYBV10/pins.csv has SD and SD_SW both defined at PA8.
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)
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.
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?
@chrismas9 resolved the confusion. Closing issue.
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).
The schematic in Eagle has the MicroSD card switch connected to PC13 (pin2).