Set output pin mode in each transfer. Add simple watchdog.