Problem using ESP32-S2-Saola-1R with JTAG-Adapter

User avatar
MickPF
Posts: 45
Joined: Tue Apr 03, 2018 8:47 pm

Problem using ESP32-S2-Saola-1R with JTAG-Adapter

Postby MickPF » Sun Jul 18, 2021 8:47 am

Hello,

I'm trying to use the same JTAG adapter (see picture in the attachment), which I used with ESP32 without any problems (connected only via the USB connector from the JTAG adapter), with the ESP32-S2 (ESP32-S2-Saola-1R board) and it doesn't work at all.
I connected them as following:

Code: Select all

Saola Board		JTAG Adapter
PU			EN
IO0			IO0
TxD			TxD
RxD			RxD
IO40			TDO
IO41			TDI
IO39			TCK
IO42			TMS
Connected in this way, it worked straight away between the ESP32 and the JTAG adapter.

I've tried step by step to connect them. As first only the serial lines and so on...

But I can't even get serial communication through. To make sure that the Saola board gets enough power, I have already connected a power supply unit (without data lines) to the USB port of the Saola board and removed the power supply jumpers on the JTAG adapter, but it doesn't work either.

Are the two boards incompatible with each other?
Is there anything else I need to do to make it work?

Has anyone had any experience with the Saola board and the JTAG adapter?

Can someone help me?

Thanks in advance,
Michael
Attachments
JTAG Adapter.jpeg
JTAG Adapter.jpeg (53.4 KiB) Viewed 2749 times
Nobody is perfect!
My name is NOT Nobody...


Nobody lives forever to correct his mistakes someday in the future, if not right now!
Covid-19 is not responsible for any human failures!

User avatar
MickPF
Posts: 45
Joined: Tue Apr 03, 2018 8:47 pm

Re: Problem using ESP32-S2-Saola-1R with JTAG-Adapter

Postby MickPF » Sun Jul 18, 2021 3:23 pm

A small addition/correction to my problem description:

When I use PuTTY on the "/dev/ttyUSB1" and press the reset button on the JTAG adapter, I'll get the expected output:

Code: Select all

ESP-ROM:esp32s2-rc4-20191025
Build:Oct 25 2019
rst:0x1 (POWERON),boot:0x8 (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3ffe6100,len:0x183c
load:0x4004c000,len:0xa04
load:0x40050000,len:0x2b80
entry 0x4004c1f4
I (21) boot: ESP-IDF v4.3-194-g5b5e46971 2nd stage bootloader
I (21) boot: compile time 17:03:40
I (21) boot: chip revision: 0
I (25) boot.esp32s2: SPI Speed      : 80MHz
I (30) boot.esp32s2: SPI Mode       : DIO
I (34) boot.esp32s2: SPI Flash Size : 4MB
I (39) boot: Enabling RNG early entropy source...
I (45) boot: Partition Table:
I (48) boot: ## Label            Usage          Type ST Offset   Length
I (55) boot:  0 nvs              WiFi data        01 02 00009000 00004000
I (63) boot:  1 otadata          OTA data         01 00 0000d000 00002000
I (70) boot:  2 phy_init         RF data          01 01 0000f000 00001000
I (78) boot:  3 factory          factory app      00 00 00010000 00100000
I (85) boot:  4 fatfs            Unknown data     01 81 00110000 00100000
I (93) boot: End of partition table
I (97) boot: Defaulting to factory image
I (102) esp_image: segment 0: paddr=00010020 vaddr=3f000020 size=0bc90h ( 48272) map
I (120) esp_image: segment 1: paddr=0001bcb8 vaddr=3ffc0f50 size=02908h ( 10504) load
I (122) esp_image: segment 2: paddr=0001e5c8 vaddr=40024000 size=01a50h (  6736) load
I (129) esp_image: segment 3: paddr=00020020 vaddr=40080020 size=25940h (153920) map
I (166) esp_image: segment 4: paddr=00045968 vaddr=40025a50 size=0b4f4h ( 46324) load
I (178) esp_image: segment 5: paddr=00050e64 vaddr=50000000 size=00010h (    16) load
I (185) boot: Loaded app from partition at offset 0x10000
I (185) boot: Disabling RNG early entropy source...
I (198) cache: Instruction cache        : size 8KB, 4Ways, cache line size 32Byte
I (198) cache: Data cache               : size 8KB, 4Ways, cache line size 32Byte
I (202) spiram: Found 16MBit SPI RAM device
I (206) spiram: SPI RAM mode: sram 40m
I (211) spiram: PSRAM initialized, cache is in normal (1-core) mode.
I (218) cpu_start: Pro cpu up.
I (632) s▒f▒▒f▒fφ~
 SPI SRAM memory test OK
I (641) cpu_start: Pro cpu start user code
I (641) cpu_start: cpu freq: 240000000
I (641) cpu_start: Application information:
I (644) cpu_start: Project name:     sd_card
I (649) cpu_start: App version:      1
I (653) cpu_start: Compile time:     Jul 17 2021 17:03:35
I (659) cpu_start: ELF file SHA256:  e441461f55bdae7a...
I (665) cpu_start: ESP-IDF:          v4.3-194-g5b5e46971
I (672) heap_init: Initializing. RAM available for dynamic allocation:
I (679) heap_init: At 3FF9E000 len 00002000 (8 KiB): RTCRAM
I (685) heap_init: At 3FFC4160 len 00037EA0 (223 KiB): DRAM
I (691) heap_init: At 3FFFC000 len 00003A10 (14 KiB): DRAM
I (697) spiram: Adding pool of 2048K of external SPI memory to heap allocator
I (706) spi_flash: detected chip: generic
I (710) spi_flash: flash io: dio
I (714) cpu_start: Starting scheduler on PRO CPU.
I (719) spiram: Reserving pool of 32K of internal memory for DMA/internal allocations
I don't get any connection at all when I run the command 'idf.py -p /dev/ttyUSB1 flash':

Code: Select all

$ idf.py -p /dev/ttyUSB1 flash
Executing action: flash
Running ninja in directory /home/mick/Projects/ESP32-S2/sdcard/build
Executing "ninja flash"...
[1/4] Performing build step for 'bootloader'
ninja: no work to do.
[1/2] cd /opt/ESP32/v4.3/esp-idf/components/esptool_py && /usr/b...t/ESP32/v4.3/esp-idf/components/esptool_py/run_serial_tool.cmake
esptool.py esp32s2 -p /dev/ttyUSB1 -b 460800 --before=default_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 80m --flash_size 4MB 0x8000 partition_table/partition-table.bin 0xd000 ota_data_initial.bin 0x1000 bootloader/bootloader.bin 0x10000 sdcard.bin
esptool.py v3.1-dev
Serial port /dev/ttyUSB1
Connecting........_____....._____....._____....._____....._____....._____....._____

A fatal error occurred: Failed to connect to ESP32-S2: Timed out waiting for packet header
CMake Error at run_serial_tool.cmake:50 (message):
  /opt/ESP32/v4.3/python_env/idf4.3_py3.8_env/bin/python
  /opt/ESP32/v4.3/esp-idf/components/esptool_py/esptool/esptool.py --chip
  esp32s2 failed


FAILED: CMakeFiles/flash 
cd /opt/ESP32/v4.3/esp-idf/components/esptool_py && /usr/bin/cmake -D IDF_PATH="/opt/ESP32/v4.3/esp-idf" -D SERIAL_TOOL="/opt/ESP32/v4.3/python_env/idf4.3_py3.8_env/bin/python /opt/ESP32/v4.3/esp-idf/components/esptool_py/esptool/esptool.py --chip esp32s2" -D SERIAL_TOOL_ARGS="--before=default_reset --after=hard_reset write_flash @flash_args" -D WORKING_DIRECTORY="/home/mick/Projects/ESP32-S2/sdcard/build" -P /opt/ESP32/v4.3/esp-idf/components/esptool_py/run_serial_tool.cmake
ninja: build stopped: subcommand failed.
ninja failed with exit code 1
It also does not work when I start flashing with additional agrument "-b 115200".

Sometimes the connection with 'idf.py -p /dev/ttyUSB1 monitor' doesn't work also and sometimes it works.

I don't think the cause is possibly loose wiring.
Nobody is perfect!
My name is NOT Nobody...


Nobody lives forever to correct his mistakes someday in the future, if not right now!
Covid-19 is not responsible for any human failures!

Who is online

Users browsing this forum: No registered users and 44 guests