Aurora-QIU0 commented on PR #20165:
URL: https://github.com/apache/nuttx/pull/20165#issuecomment-5708560685
## Testing update 鈥?build and runtime logs (ESP32-P4, real hardware)
Board: ESP32-P4 Function EV Board (`esp32p4-function-ev-board`), ESP32-P4
eco7.
Built and exercised on hardware during a board bring-up. This addresses the
build/runtime log requirement in CONTRIBUTING.md section 1.7.2.
### Build
ninja: Building C object .../espressif/esp_i2c.c.o
-> libarch.a -> nuttx -> nuttx.bin
nuttx.bin 797756 bytes md5 0c4ac4e6c0df1ed695f9911a30e39c97
flash: "Wrote 797756 bytes" + "Hash of data verified" (rc=0)
### Runtime before the change (polling mode, GT911 at 0x5d, I2C0)
Serial capture after reset 鈥?the I2C devices never come up and `nsh` is never
reached:
Failed to initialize ES8311: -19
Failed to initialize I2C driver: -12
ERROR: touch_register() failed: -12
ERROR: Failed to initialize GT911 touch: -12
Instrumented probe inside `esp_i2c_polling_waitdone()`, the decisive line:
I2CP[5] waitdone ret=0 err=0 laststatus=0x00000000
`status == 0` together with `ret == 0` is self-contradictory: had the loop
run
with `status` stuck at zero it could only have timed out after `SEC2TICK(10)`
and returned `-ETIMEDOUT`. The only reading of the observation that is
internally consistent is that the loop body never ran at all 鈥?which is
exactly
what the unsigned underflow in the comparison produces.
### Runtime after the change (same board, same bus)
CHECK1 0x8140 raw = [39 31 31 00] -> PASS ("911\0", GT911
product id)
CHECK2 0x8047 raw = [59 00 04 58 02 05] -> PASS (real config block,
not garbage)
GT911 touchscreen registered at /dev/input0 (polling mode)
nsh prompt reached; 0 panic / 0 assert / 0 ERROR
The read of `0x8140` returning the GT911 product id is only possible if the
polling wait actually waited for the transfer, i.e. the loop now runs.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]