Managed to Resolve it For future people having pains, the best config seems to be: dtoverlay=miniuart-bt enable_uart=1 and remove the segment from cmdline.txt: console=serial0,115200 used ttyAMA0 I haven't tried using the gpio control flags as it seems it was depricated from the kernal, written my own using pinctrl for testing. gpio7 is boot0 gpio27 is reset pinctrl 17 op dh pinctrl 27 op dl sleep 0.1 pinctrl 27 op dh sleep 0.2 sudo stm32flash -b 115200 /dev/ttyAMA0 -v -w generic_boot20_pc13.bin...
Managed to Resolve it For future people having pains, the best config seems to be: dtoverlay=miniuart-bt enable_uart=1 and remove the segment from cmdline.txt: console=serial0,115200 used ttyAMA0 I haven't tried using the gpio control flags as it seems it was depricated from the kernal, written my own using pinctrl for testing. pinctrl 17 op dh pinctrl 27 op dl sleep 0.1 pinctrl 27 op dh sleep 0.2 sudo stm32flash -b 115200 /dev/ttyAMA0 -v -w generic_boot20_pc13.bin sleep 0.5 pinctrl 17 op dl pinctrl...
Managed to Resolve it For future people having pains, the best config seems to be: dtoverlay=miniuart-bt enable_uart=1 and remove the segment from cmdline.txt: console=serial0,115200 used ttyAMA0 I haven't tried using the gpio control flags as it seems it was depricated from the kernal, written my own using pinctrl for testing. ~~~ shell script pinctrl 17 op dh pinctrl 27 op dl sleep 0.1 pinctrl 27 op dh sleep 0.2 sudo stm32flash -b 115200 /dev/ttyAMA0 -v -w generic_boot20_pc13.bin sleep 0.5 pinctrl...
to my understanding I am not using mini-UART. I disabled the bluetooth etc. not familier with stty, will have to have a poke.
Oh no, that is reproducing it! to clarify I only get 'Failed to set terminal flags' on existing ports.
I've just inserted a USB-Serial, and /dev/ttyUSB0 does work when it's inserted - but we really need to use the internal serial.
a full prompt example with all details: pi@test-kit:~ $ sudo stm32flash -v -w blink.bin -b 9600 /dev/serial0 stm32flash 0.7 http://stm32flash.sourceforge.net/ Using Parser : Raw BINARY Size : 146013 Failed to set terminal flags Error probing interface "serial_posix" Cannot handle device "/dev/serial0" Failed to open port: /dev/serial0
STM32F103 Blue Pill with Raspberry Pi 3 Model B