askn37 / UPDI4AVR-USB

Easily convert AVR-DU family into a USB connected UPDI/TPI programmer.
MIT License
5 stars 0 forks source link

v1.32.43 Bug fixes #5

Closed askn37 closed 2 months ago

askn37 commented 2 months ago

Added a note to the source code.

Added CONFIG_*_DISABLE to allow overriding compilation settings from the CLI or Makefile.

Added CONFIG_SYS_SW0_ALT_14P option to change the position of SW0 and nRST when DTR is not used.

Similarly, HAL_BAREMETAL_20P changes the pin position when RS232C is not used. Originally intended for FTDI series compatibility, it is not needed if used only as a pure programmer.

Remove pending timeout on EP_CDI in VCP-RxD as it is highly unlikely to be executed. If the transfer is not complete at that time, the accumulated character buffer will be discarded.

askn37 commented 2 months ago

Currently SW0 generates edge interrupts directly, but using the unused CCL might eliminate the chattering noise. It's worth a try, so I'll play around with this branch for a while.

askn37 commented 2 months ago

SW0 is split into two interrupts using CCL, one for falling edge and one for rising edge. Each is a small, fast routine that just sets a flag. The falling edge is filtered by CCL to remove chatter noise.

Improved unlocking of LOCKed devices and USERROW writes. A global timeout could cause subsequent UPDI-ACC state machines to enter the wrong state, especially in an interrupted status check loop.