Thanks a ton, Keith. Like you mentioned a while back, I was hoping I could have the USB start up normally, wait a bit, disable the USB & enable the serial port. Can’t I just call ao_usb_disable() before ao_serial_init() ?
Fun stuff! -Bryan > On Apr 3, 2018, at 11:41 PM, Keith Packard <[email protected]> wrote: > > Bryan Duke <[email protected]> writes: > >> Reviving this thread… >> >> I’m starting my hacking to get the TeleMini v3 to read an external >> u-blox GPS. I’m doing serial port config stuff. It looks like I have >> to set a few things in ao_pins.h, but I’m not sure which serial 1 >> settings the TeleMini needs. I’m guessing PA9/PA10 is the right serial >> 1 setting. (Although AO_PA11_PA12_RMP is defined in the USB section.) >> Does this look right? > > So, PA11_PA12_RMP means that the pins labeled PA9/PA10 are actually > hooked to PA11/PA12. You'll have to turn that off, at which point you > might as well disable USB as it won't be hooked up to anything (although > disabling USB would take a bit of hacking, and you may not want to do > that yet). > >> #define USE_SERIAL_1 >> #define USE_SERIAL_1_STDIN 0 >> #define SERIAL_1_PB6_PB7 0 >> #define SERIAL_1_PA9_PA10 1 > > This looks good. > >> If it needs PA11 & 12, I don’t see those defined in >> ao_serial_stm.c. I’m guessing that would look like the PA9 & 10 chunk >> of code except with 11 & 12 (gpioa & STM_AFR_AF1). ? > > You'll want to use the PA9_PA10 setting and turn off the PA11_PA12_RMP > so that you actually have live PA9_PA10 pins. > > Note that you'll still be able to get to the USB boot loader by hooking > pins 3 and 5 of the debug connector together at power on. Alternatively, > you can obviously load the firmware with any swd utility, you just won't > get the serial number set correctly (as that is in the firmware and > re-written during the flash process by ao-usbload or altosui). > > -- > -keith _______________________________________________ altusmetrum mailing list [email protected] http://lists.gag.com/mailman/listinfo/altusmetrum
