This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

software TWI 1.3mA OFF MODE

Using twi_sw_master have discovered that the nrf51422 E00 draws 1.3mA in off mode.

When the twi device is removed from the bus, the nrf51422 draws under 5uA in off mode.

I have created twi_hw_master.c correctly using SHORTS github.com/.../twi_hw_master.c

I turn hardware twi off using

NRF_TWI1->POWER  = 1;
NRF_TWI1->ENABLE = TWI_ENABLE_ENABLE_Enabled << TWI_ENABLE_ENABLE_Pos;


// do your I2C stuff here

NRF_TWI1->ENABLE = TWI_ENABLE_ENABLE_Disabled << TWI_ENABLE_ENABLE_Pos;
NRF_TWI1->POWER  = 0;

This works fine with the mpu6500, but does not with the hmc5983. I suspect the hmc5983 is some how keeping the nrf51422 twi active.

The solution could be to upmap the twi pins disconnecting the nrf51422 from the twi bus, so that the twi bus does not keep the nrf51422 active.

HOW should I unmap the twi pins? So that the nrf51422 is not effected by the twi bus?

Remapping twi pins or anything that may cause twi communication problems, causes the softdevice to HANG or not function correctly. This includes Advertising timeout not functioning, or hanging the nrf51422 on ble bonding.

Simple disabling pullups does not allow working around twi communication issues.

Parents
  • Yes, I perform a hard power reset, with the jtag disconnected before taking current measurements. I use the same testing process with and without the twi device attached.

    • When the twi device is attached the off state current is 1.3mA, combined the twi device itself consuming under 10uA (I verified this by hacking the hardware)
    • When the twi device is detached the off state current is under 5uA, approximate 3uA
Reply
  • Yes, I perform a hard power reset, with the jtag disconnected before taking current measurements. I use the same testing process with and without the twi device attached.

    • When the twi device is attached the off state current is 1.3mA, combined the twi device itself consuming under 10uA (I verified this by hacking the hardware)
    • When the twi device is detached the off state current is under 5uA, approximate 3uA
Children
No Data
Related