Page 1 of 1

Design my own pyboard, basic questions..

Posted: Thu Mar 16, 2017 2:27 am
by saulo
Hy guys!

I "finish" my script-side for a custom board using micropython and pyboard to develop and now i want to design my own board (today it's a mess of wires and connectors..)

I've experience with microchip environment and atmel also but know nothing about st... my question is very basic:

I will need some dedicated programmer to upload the micropython firmware on a brand new mcu like ICD3 or SK500 or dfu mode and a ftdi chip will do the job?

i read that mcu of pyboard came with dfu support from factory but i want to ask anyway.. :oops:

Re: Design my own pyboard, basic questions..

Posted: Thu Mar 16, 2017 3:45 am
by dhylands
The STM32F4 series has a builtin ROM DFU loader. So if you wire up the USB connector properly and provide an external crystal, then you can use BOOT0 to put the chip into DFU mode.

Re: Design my own pyboard, basic questions..

Posted: Fri Mar 17, 2017 7:42 pm
by TravisT
Also USART based bootloading can be done without a crystal. Dave and his brother have post about this, and it is a good backup.

Because there is a Python interpreter layer there really is not benefit of using a fancy programmer since you do not get to do the low level debugging those offer.

Sometimes I make SWD (serial wire debug pins) available for use just in case I might want/need a programming and debugging interface. This way you only need 4 pins.

Re: Design my own pyboard, basic questions..

Posted: Fri Mar 17, 2017 10:10 pm
by dhylands
If you do want to do debugging via gdb then you can add a JTAG or SWD interface.

The 1Bitsy is an STM32F415 based board (and I have a MicroPython board definition for it) that has a JTAG interface. If you look at the 1Bitsy schematics https://github.com/1Bitsy/1bitsy-hardwa ... ematic.pdf to use the JTAG you don't need any extra components (except perhaps a header).

Similarly, you only need to expose the SWDIO/SWCLK signals to use the SWD interface.

Re: Design my own pyboard, basic questions..

Posted: Sat Mar 18, 2017 6:24 pm
by roland_vs
I have designed a few boards with the STM32 (407/429) (but also other ARMs) and standardised on using the Tag Connect TC2030 connection with either locking holes when there is room on the PCB, or just the 6 contacts only. It allows for +/-/SWDIO/SWCLK/RXD/TXD. It is time/cost/room saving and I personally find it a better choice than using the standard pin headers.

The UART (see drawing) is there for alternative DFU instead of USB, but mainly to have REPL available when not using the USB with MicroPython.

Screenshot 2017-03-18 19.15.01.png
Screenshot 2017-03-18 19.15.01.png (16.94 KiB) Viewed 70 times