phdussud / pico-dirtyJtag

MIT License
288 stars 39 forks source link

SIG_SRST cannot be controlled with BOARD_PICO configuration. #27

Closed D4VF0 closed 1 month ago

D4VF0 commented 1 month ago

Hey,

First of all, great work on the firmware. However, I've noticed that despite defining #define BOARD_TYPE BOARD_PICO, I am unable to control the pin_rst as "emulate open drain with pull up and direction". So the USB write command "CMD_SETSIG" (0x04) to enable and disable "SIG_SRST" (1 << 6) has no effect. I observed that in the file pio_jtag.c, the lines 244 and 265: #if !( BOARD_TYPE == BOARD_QMTECH_RP2040_DAUGHTERBOARD ) have no effect because #include "dirtyJtagConfig.h" is missing and thus, the information about BOARD_TYPE is absent.

By adding #include "dirtyJtagConfig.h" to the pio_jtag.c file, I was able to control the reset pin via USB as desired by the function.

Thank you and best regards, Dave

phdussud commented 1 month ago

Hi Dave. Thank you very much for catching this problem. I will update the code base shortly.

phdussud commented 1 month ago

Updated the code base.