Why 'pwm_set_dt(xxx, 0)' can not set gpio floating on NCS SDK 3.0.2 ?

For power cost down, use dts config  to set pwm gpio H0D1 as follow:

pwm1_default: pwm1_default {
group1 {
psels = <NRF_PSEL(PWM_OUT1, 0, 26)>;
nordic,drive-mode = <NRF_DRIVE_H0D1>;
};
};

1. When on NCS 2.4.1,  pwm func 'pwm_set_dt(xxx, 0)' can set gpio floating

2. When on NCS 3.0.2, 'pwm_set_dt(xxx, 0)' can NOT set gpio floating, because current get up 50 uA !

How can I use  'pwm_set_dt(xxx, 0)' set pwm gpio floating ?  and get current cost down?

Parents Reply
  • Let me rephrase the que,our product requires PWM to drive the LED((P0.26 drive LED) and I2C to drive the Motion Sensor. However, on our product board(NCS 3.0.2), when we use pwm and I2C together, in idle state(use "pwm_set_dt(x,0)" to stop pwm), bottom current  is too high, about 50~60+uA. Our previous product was based on NCS 2.4.1,  I2C and PWM are used in the same way,but we did not find such an issue, bottom current  is less than 10uA.

    For trying to address issue, We did such tests:

    1. On product board(P0.26 drive LED), disconnect I2C pin(P0.03/P0.04) and sensor,  high bottom current exist. It means the current issue is not related to external circuits

    2. On product board(P0.26 drive LED), keep I2C pin disconnect, let CONFIG_I2C=n and delete all I2C application code(delete I2C init and other I2C ops), high bottom current disappear(bottom current  is about 5~6 uA).

    3. On DK board(as comparative experiment, P0.19 drive LED), use blinky_pwm to confirm, when add CONFIG_I2C=y, the issue can be reproduced.

    It seems just add CONFIG_I2C=y to project with pwm  function,  high bottom current issue will occurs.

Children
Related