The LDO voltage from the nPM1300 is affected by the PWM output on the nRF9151

Hello support!

I have tried all AI help out there but it seems like this might be a hardware problem. I have the nRF9151 connected to a nPM1300 on a custom board. I am using the npmx library to configure and work with the nPM from the host firmware in the nRF9151.

I hooked up the board to a oscilloscope today and probed the PWM signal to a blue LED on the board and the other probe on the LDO1 which is configured to output 2V9. The application is switching the LDO1 output toggling between on and off to save power. The behaviour i need to understand is that when the LED is turned on (approx 70% duty cycle) the toggling value of the LDO1 is nice, that is around 0 to around 2V9 which is the expected. However, if i turn off the LED and do the same the toggling values are instead arround 0 and the turing into a stair formed shape going from around 1 V to around 2V9 in 4 steps quite evenly distributed voltage and the duration of each step is around 2 s. Please see attached image below:

See selected code snippets.

Configure LDO:

if (npmx_ldsw_mode_set(ldsw_1_instance, NPMX_LDSW_MODE_LDO) != NPMX_SUCCESS)
  {
    LOG_ERR("Failed to set LDSW 1 to LDO mode");
  }

  /* Set voltage for the LDO. */
  if (npmx_ldsw_ldo_voltage_set(ldsw_1_instance, NPMX_LDSW_VOLTAGE_2V9) != NPMX_SUCCESS)
  {
    LOG_ERR("Failed to set voltage for the LDO");
  }
Toggle LDO:
/* Enable LDSW */
    if (npmx_ldsw_task_trigger(ldsw_instance, NPMX_LDSW_TASK_ENABLE) != NPMX_SUCCESS)
    {
      LOG_ERR("Failed to enable LDSW %d", id);
      ret = false;
    }
/* Disable LDSW */
    if (npmx_ldsw_task_trigger(ldsw_instance, NPMX_LDSW_TASK_DISABLE) != NPMX_SUCCESS)
    {
      LOG_ERR("Failed to disable LDSW %d", id);
      ret = false;
    }
PWM snippets:
pwm_led_blue: pwm-led-blue {
      pwms = <&pwm0 2 PWM_MSEC(20) PWM_POLARITY_INVERTED>;
      label = "PWM LED 2";
    };
Toggle LED:
OFF:
err = (int32_t)pwm_set_dt(&blue, PWM_PERIOD_NS, pulse_width_off);
  if (err != (int32_t)0)
  {
    LOG_ERR("Failed when turning off the blue LED");
  }
ON:
err = (int32_t)pwm_set_dt(
          &blue, PWM_PERIOD_NS,
          ((pulse_width_on * PWM_CORRECTION_BLUE_LED_NUM) / PWM_CORRECTION_BLUE_LED_DEN));
      if (err != (int32_t)0)
      {
        LOG_ERR("Failed when turning on the blue LED");
      }
EDIT:
The switching frequency causing this is verified at 1 Hz. When switching with lower frequency like 1 time every 4 seconds, it works

i have tried the suggested fix of reading somehting on the TWI by adding this:

/* Enable LDSW */
    if (npmx_ldsw_task_trigger(ldsw_instanceNPMX_LDSW_TASK_ENABLE!= NPMX_SUCCESS)
    {
      LOG_ERR("Failed to enable LDSW %d"id);
      ret = false;
    }
    npmx_ldsw_voltage_t voltage;
    npmx_ldsw_ldo_voltage_get(ldsw_instance&voltage);
  }
Parents Reply Children
No Data
Related