Previous journal: | Next journal: |
---|---|
0090-2023-06-06.md | 0092-2023-06-08.md |
Stuff I've journaled previously, or recently started looking into, re STM32:
- My sandpit experiments with STM32: https://github.com/algofoogle/sandpit/tree/master/stm32
- Quick links to some STM32 notes that might be useful, esp. re bootloader: https://github.com/algofoogle/sandpit/blob/master/neswifi/doco/JOURNAL.md#other-findings
- STM32F1 line can act as a USB device, but apparently also can do USB FS (Full-speed) OTG?? Read the rest of that guide!
- These are possible ways we could use an STM32 Blue Pill to be our debugging device:
- Load a bootloader (?) firmware that makes the board appear as a virtual COM port, then accepts commands via this port (regular serial TTY, say controlled by Python code) to control individual pins inc. read/write mode and tri-state. This might be what Firmata is.
- Write our own firmware that implements our own virtual COM port with our own protocol for controlling pins: I suspect some Arduino (i.e. stm32duino) code will help speed this up. This could be tailored over time to suit the specific needs of each of our target FPGA projects, inc. some smarts on the STM32 so we don't exactly need to bitbang/babysit it. This might be needed if we want to have a timely ISR for handling interrupts
- Write firmware that just uses USB capabilities directly. Probably needs more mucking about with drivers, though. Some other info here might help though, inc. this YouTube video.
- Just load MicroPython? Does the STM32 have enough guts for it, though? Maybe we can still focus on keeping the STM32 code lightweight, and the main affair on the PC.
- Maybe we should get serious and just go directly for something like the NUCLEO-F446ZE? It's only AU$31.54. FWIW, OpenMPW characterisation uses NUCLEO-F413ZH or NUCLEO-F746ZG.
- It might be possible to simulate STM32 boards, but not sure how difficult that is to do with USB virtual COM too. Check out this Blue Pill simulator on Wokwi.
- Some virtual COM port stuff for STM32 Blue Pill:
- https://github.com/philrawlings/bluepill-usb-cdc-test -- I think this is for STM32CubeIDE
- Some discussion about this for stm32duino, but not well-worded: https://www.stm32duino.com/viewtopic.php?t=1895
- Need to better-understand USB-CDC ("Communications device class").
- See also: https://stackoverflow.com/a/26925578 -- details about how USB handshake works for USB-CDC and serial port settings?
- STM32 as USB device, but requires STM32CubeIDE again? http://dangerousprototypes.com/blog/2017/06/21/how-to-stm32f103c8t6-as-an-usb-device-virtual-serial-port-cdc/
- Will this help? https://github.com/stm32duino/Arduino_Core_STM32/blob/main/cores/arduino/stm32/usb/cdc/usbd_cdc_if.c