tuya-cloudcutter / bk7231tools

This is a collection of tools to interact with and analyze artifacts for BK7231 MCUs
MIT License
38 stars 6 forks source link

Stage clearing DTR+RTS during hardware reset #14

Closed zultron closed 1 year ago

zultron commented 1 year ago

Some burners (like this one) have odd coupling between DTR and RTS inputs, and EN/RST and GPIO0 outputs. On these burners, clearing both DTR and RTS at once will not lower EN and GPIO0. To clear EN and GPIO0, DTR must be low while RTS is high.

To achieve this, this patch clears DTR first, and after a short sleep, then clears RTS.

More details at https://github.com/kuba2k2/libretuya/issues/85.