Program I2C using C on Grove Vision AI V2 (WE2 processor)

Hi there,

And Welcome here…

So , I didn’t get the memo… LOL Folks are trying all sorts of no standard uses for hardware and software this is GREAT :grin:
Here is what I can comment on, I use the trained model I posted up on here a while back. This hardware is getting a little dated IMO. Senscraft should roll out some new stuff. But I digress..

  • 0x79 is almost certainly the camera sensor (OV5647/OV5640-style). Those guys use 0x78/0x79 as their 8-bit write/read codes; scanners often show 0x79 as a “device”. Arducam+1
  • 0x28 is probably another onboard peripheral (IMU / temp / etc.) that the WiseEye chip talks to internally.
  • 0x62 is the Grove Vision AI module itself, but only when the stock / SenseCraft (or bootloader) firmware configures an I²C slave interface on that address. That’s exactly what people see in other threads: 0x62 appears when the factory firmware is running and responds with JSON-like messages over I²C/UART.

Only during flashing or SenseCraft sample I additionally get 0x62

…that’s the giveaway :eye:. When it boots into Your own Himax firmware, you’re almost certainly not enabling the I²C slave peripheral at all, so from the ESP32-S3’s point of view, there is no device at that address.
The bootloader isn’t “hiding” anything your firmware just doesn’t recreate what SenseCraft was doing.

Big conceptual mistake in this attempt:

  • The snippet he pasted from hx_drv_iic.h is I²C master code:
    • hx_drv_i2cm_init(...)
    • hx_drv_i2cm_interrupt_write(...)
    • hx_drv_i2cm_interrupt_read(...)
  • A master API will never make a new I²C slave show up to an external scanner. That code is for the WiseEye talking out to other chips on the board, not for exposing itself as a slave to the ESP32.
    To actually “create Your own slave” on the Grove Vision AI side, you’d have to:
  1. Use the slave driver (hx_drv_i2cs_*), not the master one.
  2. Configure the same I²C instance + pinmux that is wired to the Grove connector (whatever SCU pinmux the SenseCraft firmware uses). I have never used it…fwiw, others have attempted it though, check the Himax support :crossed_fingers:
  3. Set a slave address (e.g. 0x62 or something else), enable the peripheral and write ISR/callback code that handles read/write from the external master.
  4. Make sure nothing in his firmware is still using that peripheral as a master at the same time.

You really need to start from a Himax example that already exposes an I²C slave to a host (or diff the SenseCraft firmware to see how they configure I²C slave), and use hx_drv_i2cs_* with the Grove I²C pins, not i2cm.

HTH
GL :santa_claus: PJ :v: