I am having difficulties with my brand new Tuya PIR sensor:
I can't flash it because it wouldn't respond to reset on its CEN nor its RST pins (according to the documentation). I have zero experience programming (as a developer) this chip, but in the ESP world I'm used to the chip resetting when I pull the EN pin to GND. This chip, however, doesn't react to any attempt to reset it. Using the BK7231Flasher utility, that I have now successfully used on several other devices in the recent past, it wouldn't flash:
It doesn't respond to either CEN pulled to GND nor power cycling, like other devices do.
Here is an original bootlog for reference:
This is how I wired the device (Green:RX, Blue: TX):
If anybody with more experience with these chips, if you have an idea, please don't hold back! :)
Added after 14 [minutes]:
Well, in the meantime I employed a second USB-UART adapter to monitor the chip WHILE trying to reset/flash and I can see that in fact, it does reset. I just didn't think it did, because the red LED kept blinking before-during and after the reset....
Anyway, the issue still stands, I can't flash it, the flasher tool wouldn't recognize the reset.
I can't flash it because it wouldn't respond to reset on its CEN nor its RST pins (according to the documentation). I have zero experience programming (as a developer) this chip, but in the ESP world I'm used to the chip resetting when I pull the EN pin to GND. This chip, however, doesn't react to any attempt to reset it. Using the BK7231Flasher utility, that I have now successfully used on several other devices in the recent past, it wouldn't flash:
Backup name is set to PIR-sensor.
Starting read!
Read parms: start 0x00 (sector 0), len 0x200000 (0 sectors)
Now is: Thursday 12 December 2024 13:45:05.
Flasher mode: BK7231N
Going to open port: COM3.
Serial port open!
Getting bus... (now, please do reboot by CEN or by power off/on)
Getting bus failed, will try again - 0/100!
Getting bus failed, will try again - 1/100!
It doesn't respond to either CEN pulled to GND nor power cycling, like other devices do.
Here is an original bootlog for reference:
[12:46:42.344] - serial type is general
[12:46:42.393] - Open COM5 Success
[12:46:55.820] -
V:BK7231N_1.0.1
REG:cpsr spsr r13 r14
SVC:000000D3 00401C1C 000033AC
IRQ:000000d2 00000010 00401e0c 80069cca
FIR:000000d1 00000010 00401ffc 70a61b19
SYS:000000df 0040192c 00000158
ST:00000000
J 0x10000
[12:46:55.989] - [0
[12:46:55.989] - 1-01 18:12:15 TUYA Info][lr:0xba139] mqc app init ...
[01-01 18:12:15 TUYA Info][lr:0x9a1f3] thread_create name:sys_timer,stackDepth:4096,totalstackDepth:4096,priority:5
[01-01 18:12:15 TUYA Info][lr:0x9a1f3] thread_create name:cmmod,stackDepth:4096,totalstackDepth:8192,priority:4
[01-01 18:12:15 TUYA Debug][lr:0xba0e7] mq_pro:5 cnt:1
[01-01 18:12:15 TUYA Debug][lr:0xba0e7] mq_pro:31 cnt:2
[01-01 18:12:15 TUYA Debug][lr:0x9a07f] Thread:sys_timer Exec Start. Set to Running Stat
[01-01 18:12:15 TUYA Err][lr:0xacde3] logseq empty
[01-01 18:12:15 TUYA Debug][lr:0xb614b] svc online log init success
[01-01 18:12:15 TUYA Info][lr:0x9a1f3] thread_create name:wk_th-0,stackDepth:5120,totalstackDepth:13312,priority:3
[01-01 18:12:15 TUYA Err][lr:0x9f019] wd_protected_read fails gw_bi -1
[01-01 18:12:15 TUYA Debug][lr:0x9f2db] gw base read finish:-1
[01-01 18:12:15 TUYA Debug][lr:0xad0c5] ty bt cmmod regist ok:1
[01-01 18:12:15 TUYA Debug][lr:0xad4dd] upd adv para, send conn_req beacon.
[PLATFORM DEBUG]!!!!!!!!!!tuya_os_adapt_bt_port_init
[01-01 18:12
[01-01 18:12:15 TUYA Notice][lr:0xad1af] ty 1a,status:0x0
[01-01 18:12:15 TUYA Debug][lr[PLATFORM NOTICE]STACK :
[01-01 18:12:15 TUYA DIug][lr:0x5a7e1] bk7231ebug][lr:0x5a7e1] bk723n_lowpower_common_ty:2.1n_lowpower_common_ty:21.8
[PLATFORM NOTICE]C.1.8
REATE DB SUCCESS
[PLATFORM DEBUG]!!!!!!!!!!tuya_os_adapt_bt_reset_adv
[01-01 18:12:15 TUYA Notice][lr:0xad5f5] ble adv upd!
[PLATFORM NOTICE]!!!!!!!!!!tuya_before_netcfg_cb
[01-01 18:12:15 TUYA Noti[PLATFORM DEBUG]UNKNOW cNT:17
EVENT:17
[PLATFORM DEBUG]UNKNOW EVENT:16
[PLATFORM DEBUG]UNKNOW EVENT:16
[PLATFORM DEBUG]UNKNOW EVENT:16
[PLATFORM DEBUG]UNKNOW EVENT:16
[01-01 18:12:15 TUYA Notice][lr:0xb22e7] get key:
0x9e 0xa0 0x7a 0xfe 0x1d 0xfa 0x21 0x40 0x7a 0x86 0x3f 0x4f 0x33 0x68 0x18 0xee
[12:46:56.143] - [01-01 18:12:15 TUYA Inf
[12:46:56.153] - o][lr:0x9a1f3] thread_create name:mf_test,stackDepth:5120,totalstackDepth:18432,priority:4
[12:46:56.690] - [01-01 18:12:15 TUYA Notice][lr:0x58235] mf_init succ
[01-01 18:12:15 TUYA Info][lr:0x9a1f3] thread_create name:ty_uart_task,stackDepth:3072,totalstackDepth:21504,priority:3
[01-01 18:12:15 TUYA Info][lr:0x9a1f3] thread_create name:ty_record_task,stackDepth:2
[12:46:56.690] - 048,totalstackDepth:23552,priority:3
[01-01 18:12:15 TUYA Notice][lr:0x59e93] get baud:9600
[12:46:56.881] - [01-01 18:12:15 TUYA Notice][lr:0xb4369] wifi mcu init. pid:rjzon9kyxpoeksj3 firmwarekey:keyr5qhaxgstx9ys v1:2.1.8 v2:1.0.0
[PLATFORM NOTICE]bk_rst:0 tuya_rst:0
[01-01 18:12:15 TUYA Notice][lr:0xa3677] Last reset reason: 0
[01-
[12:46:56.891] - 01 18:12:15 TUYA Info][lr:0x9a1f3] thread_create name:health_monitor,stackDepth:1536,totalstackDepth:25088,priority:5
[01-01 18:12:15 TUYA Notice][lr:0xa37e7] serial_no:fc3cd734d40b
[01-01 18:12:15 TUYA Notice][lr:0xa381f] gw_cntl.gw_wsm.stat:0
[01-01 18:12:15 TUYA Err][lr:0xa384d] read wf start mode err:-6
[01-01 18:12:15 TUYA Notice][lr:0xa38ad] gw_cntl.gw_wsm.nc_tp:1
[01-01 18:12:15 TUYA Notice][lr:0xa38b5] gw_cntl.gw_wsm.md:0
[01-01 18:12:16 TUYA Notice][lr:0xa3aa3] gw_cntl.gw_if.abi:0 input:0
[01-01 18:12:16 TUYA Notice][lr:0xa3aaf] gw_cntl.gw_if.product_key:rjzon9kyxpoeksj3, input:rjzon9kyxpoeksj3
[01-01 18:12:16 TUYA Notice][lr:0xa3abb] gw_cntl.gw_if.tp:9, input:9
[01-01 18:12:16 TUYA Notice][lr:0xa3acb] gw_cntl.gw_if.firmware_key:keyr5qhaxgstx9ys, input:keyr5qhaxgstx9ys
[01-01 18:12:16 TUYA Notice][lr:0xad203] ty bt upd product:rjzon9kyxpoeksj3 0
[01-01 18:12:16 TUYA Notice][lr:0xad77b] upd product_id type:0 rjzon9kyxpoeksj3 42f9c0884d2e0a10 OVrk7zA81YAmzVeBlR4ddNQYy7ebkdoU
[01-01 18:12:16 TUYA Notice][lr:0x5a793] device_init succ
[12:46:59.292] - [01-01 18:12:18 TUYA Notice][lr:0x5a5cd] wifi status is :1
[01-01 18:12:18 TUYA Notice][lr:0xad7ff] update boun
[12:46:59.292] - d stat:0
[PLATFORM DEBUG]!!!!!!!!!!tuya_os_adapt_bt_reset_adv
[PLATFORM DEBUG]UNKNOW EVENT:19
[PLATFORM DEBUG]UNKNOW EVENT:16
[PLATFORM DEBUG]UNKNOW EVENT:20
[PLATFORM DEBUG]UNKNOW EVENT:16
[01-01 18:12:18 TUYA Notice][lr:0xad5f5] ble adv upd!
This is how I wired the device (Green:RX, Blue: TX):

If anybody with more experience with these chips, if you have an idea, please don't hold back! :)
Added after 14 [minutes]:
Well, in the meantime I employed a second USB-UART adapter to monitor the chip WHILE trying to reset/flash and I can see that in fact, it does reset. I just didn't think it did, because the red LED kept blinking before-during and after the reset....
Anyway, the issue still stands, I can't flash it, the flasher tool wouldn't recognize the reset.