nuttx/boards
Jorge Guzman 30735584a4 risc-v/gd32vw55x: fix I2C master and add gd32vw553k-start sht3x example
The GD32VW55x I2C master (the STM32-style "v2" IP) never completed a real
transfer. Two bugs:

1. Wrong kernel clock. The protocol state machine is clocked by the I2C
   kernel clock selected in RCU_CFG1.I2C0SEL, not by the APB1 bus clock that
   only feeds the register interface. The driver left it at the APB1 default
   and computed TIMING for PCLK1 (~80 MHz); the resulting prescaled period is
   so short that the SDADEL/SCLDEL setup and hold times fall below the
   analog-filter minimum of the IP, so the master latches START but never
   drives SCL (STAT stuck with BUSY set). Route I2C0 to IRC16M (16 MHz) and
   use it as clk_freq, and never let the prescaler drop below the value that
   keeps the prescaled clock at/under 4 MHz (250 ns) so SDADEL/SCLDEL stay in
   spec. This matches the vendor BSP (IRC16M, PSC=3).

2. Transfer timeout was zero. CONFIG_GD32VW55X_I2C_TIMEOTICKS has a Kconfig
   default of 0 ("override when non-zero"), but the driver derived the timeout
   with a plain #ifndef, which never triggers because the symbol is always
   defined. The polled wait loop therefore ran a single iteration and gave
   up. Address probes (NACK on the first pass) still worked and masked it;
   only multi-byte transfers exercised the loop. Honour the "0 means derive
   from seconds/milliseconds" contract.

Also make the interrupt wait immune to the ISR completing between startmsg()
and the wait (do not clobber a posted DONE), and drop a redundant cast.

To exercise this on hardware, add an "sht3x" configuration to the
gd32vw553k-start: the nsh base plus I2C0, the i2ctool and the Sensirion SHT3x
temperature/humidity driver, registered as /dev/i2c0 and /dev/temp0. I2C0 is
routed to PA2 (SCL) / PA3 (SDA) on AF4, the pins broken out on the J1 header
(datasheet Table 2-5); when SPI is enabled it claims PA2, so I2C0 falls back
to PB0/PB1, whose SDA pin is not broken out (the periph case).

Signed-off-by: Jorge Guzman <jorge.gzm@gmail.com>
2026-07-26 13:24:12 +02:00
..
arm rp23xx: Add external QSPI PSRAM (APS6404) support for the Pimoroni Pico Plus 2. 2026-07-25 13:49:05 -03:00
arm64 boards/raspberrypi-4b: Add configuration for barometer monitor example 2026-07-20 21:00:46 -03:00
avr boards/avr/avrdx/breadxavr: provide board_late_initialize 2026-06-12 09:55:11 -04:00
dummy
hc/m9s12 boards/hc: Replace board_app_initialize 2026-05-02 18:36:46 +08:00
mips arch/mips/jz4780: Add USB host and display controller drivers 2026-07-24 12:17:35 +08:00
misoc/lm32/misoc !libc/stream: remove CONFIG_LIBC_LONG_LONG and always support long long 2026-05-19 16:21:28 +08:00
or1k/mor1kx/or1k boards/comments: Remove legacy comments 2026-05-04 12:16:11 -03:00
renesas boards/comments: Remove legacy comments 2026-05-04 12:16:11 -03:00
risc-v risc-v/gd32vw55x: fix I2C master and add gd32vw553k-start sht3x example 2026-07-26 13:24:12 +02:00
sim/sim/sim boards/sim: Add command line History, Edit and Search 2026-07-24 18:37:35 -03:00
sparc !libc/stream: remove CONFIG_LIBC_LONG_LONG and always support long long 2026-05-19 16:21:28 +08:00
tricore !sched/clock: remove CONFIG_SYSTEM_TIME64 and always use 64-bit time 2026-05-19 16:21:28 +08:00
x86/qemu/qemu-i486 boards/comments: Remove legacy comments 2026-05-04 12:16:11 -03:00
x86_64/qemu/qemu-intel64 !sched/clock: remove CONFIG_SYSTEM_TIME64 and always use 64-bit time 2026-05-19 16:21:28 +08:00
xtensa boards/stm32h7/linum-stm32h753bi: enable USB FS host, add lvglterm_kbda 2026-07-08 14:08:16 -04:00
z16/z16f/z16f2800100zcog boards/z16: Replace board_app_initialize 2026-05-02 18:36:46 +08:00
z80 boards/comments: Remove legacy comments 2026-05-04 12:16:11 -03:00
.gitignore
Board.mk !tools/mkpasswd: PBKDF2 host tool and ROMFS passwd build integration 2026-07-21 20:19:14 +08:00
boardctl.c !boards/boardctl: Remove BOARDIOC_INIT 2026-05-26 09:57:29 +08:00
CMakeLists.txt
dummy.c
Kconfig Documentation: PBKDF2 login docs, board Kconfig, and CI password 2026-07-21 20:19:14 +08:00
Makefile