Hi Nordic support team,I'm developing a custom application on the Thingy53 and have encountered challenges implementing two key features that aren't covered in the standard examples:1. Battery Monitoring (NPM1100)
- Attempted ADC configuration for battery voltage reading
- ADC read operations consistently fail with error code -22 (EINVAL)
- Tried implementing battery percentage calculation and charge status detection
- Need guidance on proper devicetree configuration for the NPM1100 fuel gauge IC
- Attempted various ADC channel configurations and voltage divider setups
2. Qwiic/Stemma QT I2C Integration (DRV2605L)
- Attempted I2C configuration using multiple instances (i2c0, i2c1, i2c2)
- Tried various pin combinations for the Qwiic connector
- Implemented full DRV2605L driver with Zephyr's built-in support
- I2C scanning consistently returns "I/O error (EIO)" for address 0x5A
What I've Tried:
- Device tree overlays with different I2C instances and pin configurations
- Added pull-up resistors (bias-pull-up) and GPIO power management
- Verified I2C driver initialization and device tree parsing
- Tested with both I2C_BITRATE_STANDARD and I2C_BITRATE_FAST
- ADC configuration attempts with different channel mappings and voltage references
Current Configuration:
&i2c0 {
compatible = "nordic,nrf-twim";
status = "okay";
clock-frequency = <I2C_BITRATE_STANDARD>;
pinctrl-0 = <&i2c0_default>;
pinctrl-1 = <&i2c0_sleep>;
pinctrl-names = "default", "sleep";
drv2605l: drv2605l@5a {
compatible = "ti,drv2605";
reg = <0x5a>;
actuator-mode = "LRA";
};
};
&pinctrl {
i2c0_default: i2c0_default {
group1 {
psels = <NRF_PSEL(TWIM_SDA, 0, 5)>,
<NRF_PSEL(TWIM_SCL, 0, 4)>;
bias-pull-up;
};
};
};- Are there additional GPIO configurations or power regulators needed for the Qwiic connector?
- What's the correct I2C instance and pin mapping for the Thingy53's Qwiic port?
- Can you provide basic devicetree examples for both NPM1100 battery monitoring and Qwiic I2C setup with some basic battery reading and i2c scanning code?
- What causes ADC read failures with error code -22 (EINVAL) on the Thingy53?