You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On the freshly-added BK7238 target, GPIO edge interrupts never fire. attachInterrupt()-based consumers (ESPHome pulse_counter, hlw8012/BL0937 energy metering) receive zero edges, even with a strong, continuous signal on the pin. The same wiring/config works on BK7231N.
This makes any interrupt/pulse-driven peripheral (energy meters, pulse counters, etc.) non-functional on BK7238, while polling-based GPIO (button input, relay/LED output) works fine.
Plug energized on live mains, relay ON, ~250 W resistive/inductive load (a running drill) drawing current. A BL0937 CF output at 250 W should pulse at several hundred Hz.
Observed — flat zero for 25+ seconds on both pins:
hlw8012/BL0937 likewise logs Got power=0.0W, voltage=0.0V (exactly 0.0, not nan), i.e. the driver runs but counts no pulses.
Notes / where I looked
The Arduino IRQ shim (cores/beken-72xx/arduino/src/wiring_irq.c) looks complete and calls gpio_int_enable(...). In the BDK (beken378/driver/gpio/gpio.c), gpio_int_enable() does register the GPIO ISR (intc_service_register(IRQ_GPIO, PRI_IRQ_GPIO, gpio_isr)) and has CFG_SOC_NAME == SOC_BK7238 branches for the interrupt-level registers, so the path appears wired up — yet no user callback is ever invoked on BK7238. Something in the BK7238 GPIO interrupt enable/dispatch (e.g. ICU/INTC routing or the INT-enable register write) is likely not taking effect.
Happy to run further tests on real hardware (scope on CF pin, register dumps, etc.).
Summary
On the freshly-added BK7238 target, GPIO edge interrupts never fire.
attachInterrupt()-based consumers (ESPHomepulse_counter,hlw8012/BL0937 energy metering) receive zero edges, even with a strong, continuous signal on the pin. The same wiring/config works on BK7231N.This makes any interrupt/pulse-driven peripheral (energy meters, pulse counters, etc.) non-functional on BK7238, while polling-based GPIO (button input, relay/LED output) works fine.
Environment
masteris identical) — BK7238 support from [beken-72xx] Support BK7238 #360, BDK 3.0.78generic-bk7238-tuyaltchiptool); app confirmed booting (correct build timestamp in logs)What works vs. what doesn't
Minimal reproduction
Bare
pulse_counteron the BL0937 CF (power) and CF1 (voltage/current) pins:Plug energized on live mains, relay ON, ~250 W resistive/inductive load (a running drill) drawing current. A BL0937 CF output at 250 W should pulse at several hundred Hz.
Observed — flat zero for 25+ seconds on both pins:
hlw8012/BL0937 likewise logsGot power=0.0W, voltage=0.0V(exactly0.0, notnan), i.e. the driver runs but counts no pulses.Notes / where I looked
The Arduino IRQ shim (
cores/beken-72xx/arduino/src/wiring_irq.c) looks complete and callsgpio_int_enable(...). In the BDK (beken378/driver/gpio/gpio.c),gpio_int_enable()does register the GPIO ISR (intc_service_register(IRQ_GPIO, PRI_IRQ_GPIO, gpio_isr)) and hasCFG_SOC_NAME == SOC_BK7238branches for the interrupt-level registers, so the path appears wired up — yet no user callback is ever invoked on BK7238. Something in the BK7238 GPIO interrupt enable/dispatch (e.g. ICU/INTC routing or the INT-enable register write) is likely not taking effect.Happy to run further tests on real hardware (scope on CF pin, register dumps, etc.).