[Open_electroporator] pyflex_f401 v0.6 prototype #2 turn on
john at cibolo.com
Sat Aug 4 17:44:13 UTC 2018
I found another code interaction with the PA1 PA0 PA2 outputs.
Now I can get into a good startup state from soft reset, but after a hard reset,
a soft reset is still needed. After a good while, when the USB mass storage behavior starts, the port A GPIOs
go bad again.
This has to have something to do with the pulse() function, since a quick use of it
is needed to put GPIOs in proper off state again.
Added comments at top:
To get PA0 PA1 PA2 GPIOs to stay LO until wanted to go high, other setup is done after
reset and soft reset:
Setup is done right after imports with enable_gpio_and_timers(), then lots
of function defs and the "all good" sequence of LED flashes and power supply turn on at the end.
It is important to have the function timers_init() come before the power supply turn on.
Changed to this sequence below:
# increase the TIM1 Update Interrupt priority, by lowering it's number all the way to 1
# probably want to enable-preload (ARR, CCR1, etc), then load next set of values, then CEN
# because after n-pulses, UEV fires...
# then in a UEV interrupt (??) we can load the next set of values via DMA/memory, and re-CEN (unless there are no more data from
# make sure PA0 PA1, PA2 are output LO state
More information about the open_electroporator