Closed serg3295 closed 1 year ago
When I try to create a channel object using the ledc.newChannel method ESP throws an error
assert failed: ledc_clk_cfg_to_global_clk ledc.c:446 (false)
and then ESP restarts.
When I applied the pull request setting results in automatic clock selection ledc module began to work correctly.
ledc
Could you merge this pull request into the esp32-idf4 branch?
esp32-idf4
myChannel = ledc.newChannel({ gpio=5, bits=ledc.TIMER_13_BIT, mode=ledc.HIGH_SPEED, timer=ledc.TIMER_0, channel=ledc.CHANNEL_0, frequency=1, duty=4096 })
[0;32mI (29) boot: ESP-IDF v4.4.2 2nd stage bootloader[0m [0;32mI (29) boot: compile time 15:17:31[0m [0;32mI (29) boot: chip revision: 1[0m [0;32mI (32) boot_comm: chip revision: 1, min. bootloader chip revision: 0[0m [0;32mI (39) boot.esp32: SPI Speed : 40MHz[0m [0;32mI (43) boot.esp32: SPI Mode : DIO[0m [0;32mI (48) boot.esp32: SPI Flash Size : 4MB[0m [0;32mI (52) boot: Enabling RNG early entropy source...[0m [0;32mI (58) boot: Partition Table:[0m [0;32mI (61) boot: ## Label Usage Type ST Offset Length[0m [0;32mI (69) boot: 0 nvs WiFi data 01 02 00009000 00006000[0m [0;32mI (76) boot: 1 phy_init RF data 01 01 0000f000 00001000[0m [0;32mI (84) boot: 2 factory factory app 00 00 00010000 00180000[0m [0;32mI (91) boot: 3 lfs unknown c2 01 00190000 00010000[0m [0;32mI (99) boot: 4 storage Unknown data 01 82 001a0000 00070000[0m [0;32mI (106) boot: End of partition table[0m [0;32mI (110) boot_comm: chip revision: 1, min. application chip revision: 0[0m [0;32mI (118) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=254ech (152812) map[0m [0;32mI (181) esp_image: segment 1: paddr=00035514 vaddr=3ffb0000 size=03858h ( 14424) load[0m [0;32mI (187) esp_image: segment 2: paddr=00038d74 vaddr=40080000 size=072a4h ( 29348) load[0m [0;32mI (200) esp_image: segment 3: paddr=00040020 vaddr=400d0020 size=bc644h (771652) map[0m [0;32mI (479) esp_image: segment 4: paddr=000fc66c vaddr=400872a4 size=0f0e0h ( 61664) load[0m [0;32mI (505) esp_image: segment 5: paddr=0010b754 vaddr=400c0000 size=00064h ( 100) load[0m [0;32mI (505) esp_image: segment 6: paddr=0010b7c0 vaddr=50000000 size=00010h ( 16) load[0m [0;32mI (521) boot: Loaded app from partition at offset 0x10000[0m [0;32mI (521) boot: Disabling RNG early entropy source...[0m [0;32mI (533) cpu_start: Pro cpu up.[0m [0;32mI (534) cpu_start: Starting app cpu, entry point is 0x400814ac[0m [0;32mI (520) cpu_start: App cpu up.[0m [0;32mI (550) cpu_start: Pro cpu start user code[0m [0;32mI (550) cpu_start: cpu freq: 160000000[0m [0;32mI (550) cpu_start: Application information:[0m [0;32mI (555) cpu_start: Project name: nodemcu[0m [0;32mI (560) cpu_start: App version: 1.4.0-master_20151229-858-ge388[0m [0;32mI (567) cpu_start: Compile time: Nov 10 2022 17:28:30[0m [0;32mI (573) cpu_start: ELF file SHA256: d4c07028fdfd64b5...[0m [0;32mI (579) cpu_start: ESP-IDF: v4.4.2[0m [0;32mI (584) heap_init: Initializing. RAM available for dynamic allocation:[0m [0;32mI (591) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM[0m [0;32mI (597) heap_init: At 3FFB7AE8 len 00028518 (161 KiB): DRAM[0m [0;32mI (603) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM[0m [0;32mI (609) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM[0m [0;32mI (616) heap_init: At 40096384 len 00009C7C (39 KiB): IRAM[0m [0;32mI (623) spi_flash: detected chip: generic[0m [0;32mI (627) spi_flash: flash io: dio[0m [0;32mI (632) cpu_start: Starting scheduler on PRO CPU.[0m [0;32mI (0) cpu_start: Starting scheduler on APP CPU.[0m [0;32mI (642) uart: queue free spaces: 3[0m LFS image loaded I (762) wifi:wifi driver task: 3ffc78f0, prio:23, stack:6656, core=0 [0;32mI (762) system_api: Base MAC address is not set[0m [0;32mI (762) system_api: read default base MAC address from EFUSE[0m I (782) wifi:wifi firmware version: eeaa27d I (782) wifi:wifi certification version: v7.0 I (782) wifi:config NVS flash: enabled I (792) wifi:config nano formating: disabled I (792) wifi:Init data frame dynamic rx buffer num: 32 I (792) wifi:Init management frame dynamic rx buffer num: 32 I (802) wifi:Init management short buffer num: 32 I (802) wifi:Init dynamic tx buffer num: 32 I (812) wifi:Init static rx buffer size: 1600 I (812) wifi:Init static rx buffer num: 10 I (822) wifi:Init dynamic rx buffer num: 32 [0;32mI (822) wifi_init: rx ba win: 6[0m [0;32mI (822) wifi_init: tcpip mbox: 32[0m [0;32mI (832) wifi_init: udp mbox: 6[0m [0;32mI (832) wifi_init: tcp mbox: 6[0m [0;32mI (832) wifi_init: tcp tx win: 5744[0m [0;32mI (842) wifi_init: tcp rx win: 5744[0m [0;32mI (842) wifi_init: tcp mss: 1436[0m [0;32mI (852) wifi_init: WiFi IRAM OP enabled[0m [0;32mI (852) wifi_init: WiFi RX IRAM OP enabled[0m NodeMCU ESP32 build unspecified powered by Lua 5.3.5 [5.3-int32-singlefp] on IDF v4.4.2
ESP32 Devkitc_v4
Apologies for the huge delay. The fix has now been merged.
Thank you!
Actual behavior
When I try to create a channel object using the ledc.newChannel method ESP throws an error
and then ESP restarts.
When I applied the pull request setting results in automatic clock selection
ledc
module began to work correctly.Could you merge this pull request into the
esp32-idf4
branch?Test code
NodeMCU startup banner
Hardware
ESP32 Devkitc_v4