State of GPIO pins during flash and reset/reboot

Device: NRF5340; NRF Connect SDK 2.5.0.

We have a 12V DC motor connected to NRF5340 GPIO P1.13 (direction) and P1.11 (speed: 0 = stop; 1 = full speed). Whenever we flash our device or reset it (reset pin), the motor turns until our initialization code stops it. How can we get it to not turn during flash and reboot?

When our code runs, in it's init function,  it configures the relevant pins using gpio_pin_configure(gpio_1, pin_number, GPIO_PULL_DOWN) and the motor stops turning, but we can't have the motor turning during a reflash/OTA/reset. 

There are related tickets asking about GPIO state during reset/reboot but it's unclear whether the pins are set to high impedance inputs with no pull up/pull down or can be set to low.
https://devzone.nordicsemi.com/f/nordic-q-a/36508/nrf52840-pin-state-during-reset 

 https://devzone.nordicsemi.com/f/nordic-q-a/67558/twi-sda-scl-held-low-during-reset-when-using-twis/276873  

Appreciate any help or guidance you can offer as to how we may be able to keep these GPIO pins at low during flash or reset. Thanks! Dan.

Parents Reply Children
No Data
Related