I2C ISSUE :RRC2040 SMBus battery (0x0B) not detected on i.MX8MP Phytech board using I2C3 (Yocto BSP)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

I2C ISSUE :RRC2040 SMBus battery (0x0B) not detected on i.MX8MP Phytech board using I2C3 (Yocto BSP)

406 Views
kartikjva
Contributor I

Hello NXP Community,

I'm working on an i.MX8MP Phytech Evaluation Board running a Yocto-based Linux image,
and I'm trying to interface an RRC2040 SMBus smart battery pack over I²C.

Hardware setup:
- Board: Phytech i.MX8MP Evaluation Board
- Battery: RRC2040 (SMBus Smart Battery)
- I²C port: I²C3 (connected via external header)
- Expected SMBus address: 0x0B
- Command used for State of Charge (RSOC): 0x0D

Software environment:
- Yocto BSP for i.MX8MP (unmodified)
- Linux kernel with `/dev/i2c-3` device node available
- Using `i2cdetect -y 3` to probe the bus

Problem:
The battery at address 0x0B does not appear in the `i2cdetect` scan.
Other I²C devices on the board are detected correctly.
Even when running as root, 0x0B does not respond.

Test code:
I also tested with a minimal C++ program using `i2c-dev` and `i2c_smbus_read_word_data(fd, 0x0D)`:

cpp
#include <iostream>
#include <unistd.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <linux/i2c-dev.h>
#include <cstring>
extern "C" { #include <i2c/smbus.h> }

int main() {
const char* dev = "/dev/i2c-3";
int fd = open(dev, O_RDWR);
ioctl(fd, I2C_SLAVE, 0x0B);
int res = i2c_smbus_read_word_data(fd, 0x0D); // RSOC command
std::cout << "Result: " << res << std::endl;
}


kartikjva_1-1762178530944.png
So i tried other i2c ports such as /dev/i2c-0 and /dev/i2c-1 but it did not work.
My hardware connection are correct.

 



0 Kudos
Reply
3 Replies

347 Views
kartikjva
Contributor I

We tested another sensor, the DS3231, and its I²C address is being detected correctly on the Phytec i.MX8MP board.

We also verified the battery pack by testing it on other platforms—such as Arduino, STM32, and Raspberry Pi—where it works fine. However, it is not being detected on the Phytec i.MX8MP board.

Additionally, we confirmed that the pull-up resistors in use are 10kΩ.

0 Kudos
Reply

331 Views
AldoG
NXP TechSupport
NXP TechSupport

Hello,

The result of your test proves that the bus is working correctly and that the battery pack does as well, do you have a simple schematic on how is being connected?

Have you checked if the battery pack requires a driver for it to work correctly?

I would recommend to reach phytec for any hardware issue the board may have.

Best regards/Saludos,
Aldo.

0 Kudos
Reply

362 Views
AldoG
NXP TechSupport
NXP TechSupport

Hello,

This may be caused by the battery pack, may require some additional connection, I would recommend to first check this.

Also, if possible I would recommend to try connecting another I2C device to ensure that the I2C communication is working correctly.

Best regards/Saludos,
Aldo.

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2197566%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EI2C%20ISSUE%20%3ARRC2040%20SMBus%20battery%20(0x0B)%20not%20detected%20on%20i.MX8MP%20Phytech%20board%20using%20I2C3%20(Yocto%20BSP)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2197566%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%20NXP%20Community%2C%3C%2FP%3E%3CP%3EI'm%20working%20on%20an%20%3CSTRONG%3Ei.MX8MP%20Phytech%20Evaluation%20Board%3C%2FSTRONG%3E%20running%20a%20Yocto-based%20Linux%20image%2C%3CBR%20%2F%3Eand%20I'm%20trying%20to%20interface%20an%20%3CSTRONG%3ERRC2040%20SMBus%20smart%20battery%20pack%3C%2FSTRONG%3E%20over%20I%C2%B2C.%3C%2FP%3E%3CP%3E%3CSTRONG%3EHardware%20setup%3A%3C%2FSTRONG%3E%3CBR%20%2F%3E-%20Board%3A%20Phytech%20i.MX8MP%20Evaluation%20Board%3CBR%20%2F%3E-%20Battery%3A%20RRC2040%20(SMBus%20Smart%20Battery)%3CBR%20%2F%3E-%20I%C2%B2C%20port%3A%20I%C2%B2C3%20(connected%20via%20external%20header)%3CBR%20%2F%3E-%20Expected%20SMBus%20address%3A%200x0B%3CBR%20%2F%3E-%20Command%20used%20for%20State%20of%20Charge%20(RSOC)%3A%200x0D%3C%2FP%3E%3CP%3E%3CSTRONG%3ESoftware%20environment%3C%2FSTRONG%3E%3A%3CBR%20%2F%3E-%20Yocto%20BSP%20for%20i.MX8MP%20(unmodified)%3CBR%20%2F%3E-%20Linux%20kernel%20with%20%60%2Fdev%2Fi2c-3%60%20device%20node%20available%3CBR%20%2F%3E-%20Using%20%60i2cdetect%20-y%203%60%20to%20probe%20the%20bus%3C%2FP%3E%3CP%3E%3CSTRONG%3EProblem%3A%3C%2FSTRONG%3E%3CBR%20%2F%3EThe%20battery%20at%20address%200x0B%20does%20%3CSTRONG%3Enot%3C%2FSTRONG%3E%20appear%20in%20the%20%60i2cdetect%60%20scan.%3CBR%20%2F%3EOther%20I%C2%B2C%20devices%20on%20the%20board%20are%20detected%20correctly.%3CBR%20%2F%3EEven%20when%20running%20as%20root%2C%200x0B%20does%20not%20respond.%3C%2FP%3E%3CP%3E%3CSTRONG%3ETest%20code%3A%3C%2FSTRONG%3E%3CBR%20%2F%3EI%20also%20tested%20with%20a%20minimal%20C%2B%2B%20program%20using%20%60i2c-dev%60%20and%20%60i2c_smbus_read_word_data(fd%2C%200x0D)%60%3A%3C%2FP%3E%3CP%3E%3CSTRONG%3Ecpp%3C%2FSTRONG%3E%3CBR%20%2F%3E%23include%20%3CIOSTREAM%3E%3CBR%20%2F%3E%23include%20%3CUNISTD.H%3E%3CBR%20%2F%3E%23include%20%3CFCNTL.H%3E%3CBR%20%2F%3E%23include%20%3CSYS%3E%3CBR%20%2F%3E%23include%20%3CLINUX%3E%3CBR%20%2F%3E%23include%20%3CCSTRING%3E%3CBR%20%2F%3Eextern%20%22C%22%20%7B%20%23include%20%3CI2C%3E%20%7D%3C%2FI2C%3E%3C%2FCSTRING%3E%3C%2FLINUX%3E%3C%2FSYS%3E%3C%2FFCNTL.H%3E%3C%2FUNISTD.H%3E%3C%2FIOSTREAM%3E%3C%2FP%3E%3CP%3Eint%20main()%20%7B%3CBR%20%2F%3Econst%20char*%20dev%20%3D%20%22%2Fdev%2Fi2c-3%22%3B%3CBR%20%2F%3Eint%20fd%20%3D%20open(dev%2C%20O_RDWR)%3B%3CBR%20%2F%3Eioctl(fd%2C%20I2C_SLAVE%2C%200x0B)%3B%3CBR%20%2F%3Eint%20res%20%3D%20i2c_smbus_read_word_data(fd%2C%200x0D)%3B%20%2F%2F%20RSOC%20command%3CBR%20%2F%3Estd%3A%3Acout%20%26lt%3B%26lt%3B%20%22Result%3A%20%22%20%26lt%3B%26lt%3B%20res%20%26lt%3B%26lt%3B%20std%3A%3Aendl%3B%3CBR%20%2F%3E%7D%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22kartikjva_1-1762178530944.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22kartikjva_1-1762178530944.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F363737i9A73E216C0391F4A%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22kartikjva_1-1762178530944.png%22%20alt%3D%22kartikjva_1-1762178530944.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3CBR%20%2F%3ESo%20i%20tried%20other%20i2c%20ports%20such%20as%20%2Fdev%2Fi2c-0%20and%20%2Fdev%2Fi2c-1%20but%20it%20did%20not%20work.%3CBR%20%2F%3EMy%20hardware%20connection%20are%20correct.%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2199253%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20I2C%20ISSUE%20%3ARRC2040%20SMBus%20battery%20(0x0B)%20not%20detected%20on%20i.MX8MP%20Phytech%20board%20using%20I2C3%20(Yocto%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2199253%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%3CBR%20%2F%3E%3CBR%20%2F%3EThe%20result%20of%20your%20test%20proves%20that%20the%20bus%20is%20working%20correctly%20and%20that%20the%20battery%20pack%20does%20as%20well%2C%20do%20you%20have%20a%20simple%20schematic%20on%20how%20is%20being%20connected%3F%3CBR%20%2F%3E%3CBR%20%2F%3EHave%20you%20checked%20if%20the%20battery%20pack%20requires%20a%20driver%20for%20it%20to%20work%20correctly%3F%3CBR%20%2F%3E%3CBR%20%2F%3EI%20would%20recommend%20to%20reach%20phytec%20for%20any%20hardware%20issue%20the%20board%20may%20have.%3CBR%20%2F%3E%3CBR%20%2F%3EBest%20regards%2FSaludos%2C%3CBR%20%2F%3EAldo.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2198789%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20I2C%20ISSUE%20%3ARRC2040%20SMBus%20battery%20(0x0B)%20not%20detected%20on%20i.MX8MP%20Phytech%20board%20using%20I2C3%20(Yocto%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2198789%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EWe%20tested%20another%20sensor%2C%20the%20DS3231%2C%20and%20its%20I%C2%B2C%20address%20is%20being%20detected%20correctly%20on%20the%20Phytec%20i.MX8MP%20board.%3C%2FP%3E%3CP%3EWe%20also%20verified%20the%20battery%20pack%20by%20testing%20it%20on%20other%20platforms%E2%80%94such%20as%20Arduino%2C%20STM32%2C%20and%20Raspberry%20Pi%E2%80%94where%20it%20works%20fine.%20However%2C%20it%20is%20not%20being%20detected%20on%20the%20Phytec%20i.MX8MP%20board.%3C%2FP%3E%3CP%3EAdditionally%2C%20we%20confirmed%20that%20the%20pull-up%20resistors%20in%20use%20are%2010k%CE%A9.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2198575%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20I2C%20ISSUE%20%3ARRC2040%20SMBus%20battery%20(0x0B)%20not%20detected%20on%20i.MX8MP%20Phytech%20board%20using%20I2C3%20(Yocto%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2198575%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%3CBR%20%2F%3E%3CBR%20%2F%3EThis%20may%20be%20caused%20by%20the%20battery%20pack%2C%20may%20require%20some%20additional%20connection%2C%20I%20would%20recommend%20to%20first%20check%20this.%3CBR%20%2F%3E%3CBR%20%2F%3EAlso%2C%20if%20possible%20I%20would%20recommend%20to%20try%20connecting%20another%20I2C%20device%20to%20ensure%20that%20the%20I2C%20communication%20is%20working%20correctly.%3CBR%20%2F%3E%3CBR%20%2F%3EBest%20regards%2FSaludos%2C%3CBR%20%2F%3EAldo.%3C%2FP%3E%3C%2FLINGO-BODY%3E