NovaGlide ultrasonic + i2c mutex

This commit is contained in:
2026-01-05 03:12:07 -05:00
parent 2b2cc9965c
commit a20a220fc9
5 changed files with 214 additions and 0 deletions

View File

@@ -1066,3 +1066,5 @@
126 135 1767600695047652883 bootloader-prefix/src/bootloader-stamp/bootloader-done d3d9d5da12f3e934
126 135 1767600695047652883 /home/alex/github/ESP-Nodes/ESP-IDF_NovaGlide/build/CMakeFiles/bootloader-complete d3d9d5da12f3e934
126 135 1767600695047652883 /home/alex/github/ESP-Nodes/ESP-IDF_NovaGlide/build/bootloader-prefix/src/bootloader-stamp/bootloader-done d3d9d5da12f3e934
135 7931 1767600695048652892 CMakeFiles/flash 465df3177a9d08e3
135 7931 1767600695048652892 /home/alex/github/ESP-Nodes/ESP-IDF_NovaGlide/build/CMakeFiles/flash 465df3177a9d08e3

View File

@@ -0,0 +1,5 @@
--- esp-idf-monitor 1.8.0 on /dev/ttyACM0 115200
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H
--- 0x403851ba: rv_utils_wait_for_intr at /home/alex/esp/esp-idf/v5.4.1/components/riscv/include/riscv/rv_utils.h:62
--- (inlined by) esp_cpu_wait_for_intr at /home/alex/esp/esp-idf/v5.4.1/components/esp_hw_support/cpu.c:62


View File

@@ -0,0 +1,70 @@
[1/5] cd /home/alex/github/ESP-Nodes/ESP-IDF_NovaGlide/build/esp-idf/esptool_py && /home/alex/.espressif/python_env/idf5.4_py3.13_env/bin/python /home/alex/esp/esp-idf/v5.4.1/components/partition_table/check_sizes.py --offset 0x8000 partition --type app /home/alex/github/ESP-Nodes/ESP-IDF_NovaGlide/build/partition_table/partition-table.bin /home/alex/github/ESP-Nodes/ESP-IDF_NovaGlide/build/ESP-IDF_NovaGlide.bin
ESP-IDF_NovaGlide.bin binary size 0xc6c90 bytes. Smallest app partition is 0x100000 bytes. 0x39370 bytes (22%) free.
[2/5] Performing build step for 'bootloader'
[1/1] cd /home/alex/github/ESP-Nodes/ESP-IDF_NovaGlide/build/bootloader/esp-idf/esptool_py && /home/alex/.espressif/python_env/idf5.4_py3.13_env/bin/python /home/alex/esp/esp-idf/v5.4.1/components/partition_table/check_sizes.py --offset 0x8000 bootloader 0x0 /home/alex/github/ESP-Nodes/ESP-IDF_NovaGlide/build/bootloader/bootloader.bin
Bootloader binary size 0x5160 bytes. 0x2ea0 bytes (36%) free.
[3/5] No install step for 'bootloader'
[4/5] Completed 'bootloader'
[4/5] cd /home/alex/esp/esp-idf/v5.4.1/components/esptool_py && /home/alex/.espressif/tools/cmake/3.30.2/bin/cmake -D IDF_PATH=/home/alex/esp/esp-idf/v5.4.1 -D "SERIAL_TOOL=/home/alex/.espressif/python_env/idf5.4_py3.13_env/bin/python;;/home/alex/esp/esp-idf/v5.4.1/components/esptool_py/esptool/esptool.py;--chip;esp32c3" -D "SERIAL_TOOL_ARGS=--before=default_reset;--after=hard_reset;write_flash;@flash_args" -D WORKING_DIRECTORY=/home/alex/github/ESP-Nodes/ESP-IDF_NovaGlide/build -P /home/alex/esp/esp-idf/v5.4.1/components/esptool_py/run_serial_tool.cmake
esptool.py --chip esp32c3 -p /dev/ttyACM0 -b 460800 --before=default_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 80m --flash_size 2MB 0x0 bootloader/bootloader.bin 0x10000 ESP-IDF_NovaGlide.bin 0x8000 partition_table/partition-table.bin
esptool.py v4.10.0
Serial port /dev/ttyACM0
Connecting...
Chip is ESP32-C3 (QFN32) (revision v0.4)
Features: WiFi, BLE
Crystal is 40MHz
USB mode: USB-Serial/JTAG
MAC: e4:b0:63:17:9e:44
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Flash will be erased from 0x00000000 to 0x00005fff...
Flash will be erased from 0x00010000 to 0x000d6fff...
Flash will be erased from 0x00008000 to 0x00008fff...
SHA digest in image updated
Compressed 20832 bytes to 13051...
Writing at 0x00000000... (100 %)
Wrote 20832 bytes (13051 compressed) at 0x00000000 in 0.5 seconds (effective 342.6 kbit/s)...
Hash of data verified.
Compressed 814224 bytes to 466912...
Writing at 0x00010000... (3 %)
Writing at 0x0001bfae... (6 %)
Writing at 0x00024cf1... (10 %)
Writing at 0x0002ec11... (13 %)
Writing at 0x0003568a... (17 %)
Writing at 0x0003d0ae... (20 %)
Writing at 0x000441a2... (24 %)
Writing at 0x0004b172... (27 %)
Writing at 0x00051692... (31 %)
Writing at 0x00057f0d... (34 %)
Writing at 0x0005e43a... (37 %)
Writing at 0x000642b4... (41 %)
Writing at 0x0006a668... (44 %)
Writing at 0x00070cc2... (48 %)
Writing at 0x00076de4... (51 %)
Writing at 0x0007cf3d... (55 %)
Writing at 0x0008361d... (58 %)
Writing at 0x0008a0e3... (62 %)
Writing at 0x00091370... (65 %)
Writing at 0x0009856c... (68 %)
Writing at 0x0009eb7d... (72 %)
Writing at 0x000a4a00... (75 %)
Writing at 0x000ab0d9... (79 %)
Writing at 0x000b1308... (82 %)
Writing at 0x000b7104... (86 %)
Writing at 0x000bf9c5... (89 %)
Writing at 0x000c6675... (93 %)
Writing at 0x000cd23c... (96 %)
Writing at 0x000d384f... (100 %)
Wrote 814224 bytes (466912 compressed) at 0x00010000 in 6.0 seconds (effective 1091.6 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 103...
Writing at 0x00008000... (100 %)
Wrote 3072 bytes (103 compressed) at 0x00008000 in 0.1 seconds (effective 356.1 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting via RTS pin...

View File

@@ -0,0 +1,137 @@
I (209) esp_image: segment 4: paddr=000c6440 vaddr=403834a0 sizeESP-ROM:esp32c3-api1-20210207
Build:Feb 7 2021
rst:0x15 (USB_UART_CHIP_RESET),boot:0xf (SPI_FAST_FLASH_BOOT)
Saved PC:0x403851ba
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd5820,len:0x1574
load:0x403cc710,len:0xc30
load:0x403ce710,len:0x2f64
entry 0x403cc71a
I (24) boot: ESP-IDF v5.4.1 2nd stage bootloader
I (24) boot: compile time Jan 4 2026 20:56:49
I (25) boot: chip revision: v0.4
I (25) boot: efuse block revision: v1.3
I (28) boot.esp32c3: SPI Speed : 80MHz
I (32) boot.esp32c3: SPI Mode : DIO
I (36) boot.esp32c3: SPI Flash Size : 2MB
I (39) boot: Enabling RNG early entropy source...
I (44) boot: Partition Table:
I (46) boot: ## Label Usage Type ST Offset Length
I (53) boot: 0 nvs WiFi data 01 02 00009000 00006000
I (59) boot: 1 phy_init RF data 01 01 0000f000 00001000
I (66) boot: 2 factory factory app 00 00 00010000 00100000
I (72) boot: End of partition table
I (76) esp_image: segment 0: paddr=00010020 vaddr=3c0a0020 size=19d90h (105872) map
I (100) esp_image: segment 1: paddr=00029db8 vaddr=3fc93e00 size=02db8h ( 11704) load
I (102) esp_image: segment 2: paddr=0002cb78 vaddr=40380000 size=034a0h ( 13472) load
I (106) esp_image: segment 3: paddr=00030020 vaddr=42000020 size=96418h (615448) map
I (209) esp_image: segment 4: paddr=000c6440 vaddr=403834a0 size=10804h ( 67588) load
I (222) esp_image: segment 5: paddr=000d6c4c vaddr=50000200 size=0001ch ( 28) load
I (228) boot: Loaded app from partition at offset 0x10000
I (229) boot: Disabling RNG early entropy source...
I (239) cpu_start: Unicore app
I (248) cpu_start: Pro cpu start user code
I (248) cpu_start: cpu freq: 160000000 Hz
I (248) app_init: Application information:
I (248) app_init: Project name: ESP-IDF_NovaGlide
I (253) app_init: App version: ESP32-Node_Switch-v2.7-11993-g9
I (259) app_init: Compile time: Jan 5 2026 03:11:24
I (264) app_init: ELF file SHA256: f55807efd...
I (268) app_init: ESP-IDF: v5.4.1
I (272) efuse_init: Min chip rev: v0.3
I (276) efuse_init: Max chip rev: v1.99 
I (280) efuse_init: Chip rev: v0.4
I (284) heap_init: Initializing. RAM available for dynamic allocation:
I (290) heap_init: At 3FC9AF80 len 00025080 (148 KiB): RAM
I (295) heap_init: At 3FCC0000 len 0001C710 (113 KiB): Retention RAM
I (301) heap_init: At 3FCDC710 len 00002950 (10 KiB): Retention RAM
I (307) heap_init: At 5000021C len 00001DCC (7 KiB): RTCRAM
I (313) spi_flash: detected chip: generic
I (316) spi_flash: flash io: dio
W (319) spi_flash: Detected size(4096k) larger than the size in the binary image header(2048k). Using the size in the binary image header.
I (332) sleep_gpio: Configure to isolate all GPIO pins in sleep state
I (337) sleep_gpio: Enable automatic switching of GPIO sleep configuration
I (344) main_task: Started on CPU0
I (344) main_task: Calling app_main()
I (354) SYSTEM_INIT: System initialization complete
I (354) pp: pp rom version: 9387209
I (354) net80211: net80211 rom version: 9387209
I (364) wifi:wifi driver task: 3fca3a00, prio:23, stack:6656, core=0
I (374) wifi:wifi firmware version: 79fa3f41ba
I (374) wifi:wifi certification version: v7.0
I (374) wifi:config NVS flash: enabled
I (374) wifi:config nano formatting: disabled
I (384) wifi:Init data frame dynamic rx buffer num: 32
I (384) wifi:Init static rx mgmt buffer num: 5
I (384) wifi:Init management short buffer num: 32
I (394) wifi:Init dynamic tx buffer num: 32
I (394) wifi:Init static tx FG buffer num: 2
I (404) wifi:Init static rx buffer size: 1600
I (404) wifi:Init static rx buffer num: 10
I (404) wifi:Init dynamic rx buffer num: 32
I (414) wifi_init: rx ba win: 6
I (414) wifi_init: accept mbox: 6
I (414) wifi_init: tcpip mbox: 32
I (424) wifi_init: udp mbox: 6
I (424) wifi_init: tcp mbox: 6
I (424) wifi_init: tcp tx win: 5760
I (434) wifi_init: tcp rx win: 5760
I (434) wifi_init: tcp mss: 1440
I (434) wifi_init: WiFi IRAM OP enabled
I (444) wifi_init: WiFi RX IRAM OP enabled
W (444) wifi:Password length matches WPA2 standards, authmode threshold changes from OPEN to WPA2
I (454) phy_init: phy_version 1200,2b7123f9,Feb 18 2025,15:22:21
I (504) wifi:mode : sta (e4:b0:63:17:9e:44)
I (504) wifi:enable tsf
I (634) wifi:new:<1,0>, old:<1,0>, ap:<255,255>, sta:<1,0>, prof:1, snd_ch_cfg:0x0
I (634) wifi:state: init -> auth (0xb0)
I (634) wifi:state: auth -> assoc (0x0)
I (644) wifi:state: assoc -> run (0x10)
I (674) wifi:connected with IoT_bots, aid = 3, channel 1, BW20, bssid = 62:a6:e6:79:02:ee
I (674) wifi:security: WPA2-PSK, phy: bg, rssi: -28
I (674) wifi:pm start, type: 1
I (684) wifi:dp: 1, bi: 102400, li: 3, scale listen interval from 307200 us to 307200 us
I (694) wifi:set rx beacon pti, rx_bcn_pti: 0, bcn_timeout: 25000, mt_pti: 0, mt_time: 10000
I (694) wifi:AP's beacon interval = 102400 us, DTIM period = 1
I (1734) esp_netif_handlers: sta ip: 10.100.71.55, mask: 255.255.255.0, gw: 10.100.71.1
I (3504) WIFI_SYS: WiFi initialized and connecting...
I (3504) WIFI_SYS: SSID: IoT_bots
W (3504) WIFI_SYS: WiFi Channel: 1
W (3504) WIFI_SYS: Receiver MAC: E4:B0:63:17:9E:44
W (3504) WIFI_SYS: Transmitter will scan channels to find receiver
I (3514) ULTRA_TEST_APP: Initializing I2C bus...
I (3514) I2C_BUS: Initializing I2C bus...
I (3514) I2C_BUS: SDA: 3
I (3524) I2C_BUS: SCL: 2
I (3524) I2C_BUS: I2C bus initialized
I (3524) I2C_BUS: Scanning I2C bus...
I (3534) I2C_BUS: Found device at 0x40
I (3544) I2C_BUS: Found device at 0x57
I (3544) ULTRA_TEST_APP: Scanning I2C bus...
I (3544) I2C_BUS: Scanning I2C bus...
I (3554) I2C_BUS: Found device at 0x40
I (3554) I2C_BUS: Found device at 0x57
I (3564) ULTRA_TEST_APP: Initializing INA219...
I (3564) I2C_BUS: Adding device 'INA219' at 0x40
I (3564) INA219: INA219 initialized
I (3564) ULTRA_TEST_APP: Initializing ultrasonic (HC-SR04 I2C)...
I (3574) I2C_BUS: Adding device 'HC-SR04_I2C' at 0x57
I (3574) ULTRASONIC: Ultrasonic I2C sensor initialized at 0x57
I (3784) ULTRA_TEST_APP: Starting raw ultrasonic read loop...
E (3784) i2c.master: I2C transaction timeout detected
E (3784) i2c.master: s_i2c_synchronous_transaction(924): I2C transaction failed
E (3844) i2c.master: clear bus failed.
E (3844) i2c.master: i2c_master_receive(1240): I2C transaction failed
W (3844) ULTRA_RAW: raw read failed: ESP_ERR_INVALID_STATE
E (4844) i2c.master: I2C transaction timeout detected
E (4844) i2c.master: s_i2c_synchronous_transaction(924): I2C transaction failed
E (4904) i2c.master: clear bus failed.
E (4904) i2c.master: i2c_master_receive(1240): I2C transaction failed
W (4904) ULTRA_RAW: raw read failed: ESP_ERR_INVALID_STATE
E (5904) i2c.master: I2C transaction timeout detected
E (5904) i2c.master: s_i2c_synchronous_transaction(924): I2C transaction failed
E (5964) i2c.master: clear bus failed.
E (5964) i2c.master: i2c_master_receive(1240): I2C transaction failed
W (5964) ULTRA_RAW: raw read failed: ESP_ERR_INVALID_STATE