ESP32-S3 GPIO 39~42 (JTAG) during early boot stages
Posted: Sat May 11, 2024 2:38 pm
I encounter an issue with my ESP32-S3 (Espressif DEVKIT-C1-v1.0 N8R2) for an application developed under Arduino IDE (v2.3.2)
Despite I selected "JTAG Adapter : Disabled" in the IDE menu, it seems that these pins (in particular pin 39 and 40) still behave as a JTAG adapter during the early stages of the boot process, before my own application gets started and take control of these pins as plain GPIO.
Issue is that I have hardwired these pins to some H-bridge to control some motor, and therefore, until my application takes control, the motor spin for some short time (during hard reset) or a long time (during upload of an sketch).
I was aware that these pins have the dual role JTAG/GPIO, but since my project requires a lot of GPIO, I did not have the choice but ot use them, and was expecting the "JTAG Adapter : Disabled" will avoid this sort of issue.
On top, now everything is on a PCB, I'd rather avoid to cut some trace and solder an ugly wire bridge of some sort, if avoidable.
I'm pretty sure I'm not the first one to have this type of issue, therefore searched online, but still confused...
From what I read, it seems that the JTAG feature can be totally disabled via eFuses...
I wonder if someone can help me with the 2 below question :
- Will disabling JTAG from eFuse have the expected effect (GPIO39~GPIO42 "quiet" from 1st stages of boot) ?
- How, practically, burn these efuses ? (i read into "espefuse.py" stuff online, but I cannot find it anywhere in the Arduino install folders)
Of course, if someone happen to know other solutions, I'm absolutely interested in them !
Apologies for the newbie topic above.
Despite I selected "JTAG Adapter : Disabled" in the IDE menu, it seems that these pins (in particular pin 39 and 40) still behave as a JTAG adapter during the early stages of the boot process, before my own application gets started and take control of these pins as plain GPIO.
Issue is that I have hardwired these pins to some H-bridge to control some motor, and therefore, until my application takes control, the motor spin for some short time (during hard reset) or a long time (during upload of an sketch).
I was aware that these pins have the dual role JTAG/GPIO, but since my project requires a lot of GPIO, I did not have the choice but ot use them, and was expecting the "JTAG Adapter : Disabled" will avoid this sort of issue.
On top, now everything is on a PCB, I'd rather avoid to cut some trace and solder an ugly wire bridge of some sort, if avoidable.
I'm pretty sure I'm not the first one to have this type of issue, therefore searched online, but still confused...
From what I read, it seems that the JTAG feature can be totally disabled via eFuses...
I wonder if someone can help me with the 2 below question :
- Will disabling JTAG from eFuse have the expected effect (GPIO39~GPIO42 "quiet" from 1st stages of boot) ?
- How, practically, burn these efuses ? (i read into "espefuse.py" stuff online, but I cannot find it anywhere in the Arduino install folders)
Of course, if someone happen to know other solutions, I'm absolutely interested in them !
Apologies for the newbie topic above.