Hello,
I need help,
I'am using uvision V5.17, SDK 9.0.0 and SD130.
First problem is solved,
If I don't declare app_pwm_init() in app_pwm.h, the current is 0.4mAh steadily,
but If I declare app_pwm_init() the current increase to 1.6mAh.
So I reference from this blog I found the answer.
but it's not perfect.
static void start_servo(void)
{
nrf_drv_gpiote_out_task_enable(SERVO_PIN);
/* Initialize and enable PWM. */
uint32_t err_code = app_pwm_init(m_pwm_t, m_pwm1_cfg, servo_ready_callback);
APP_ERROR_CHECK(err_code);
app_pwm_enable(m_pwm_t);
}
-----------------------------after above start_servo() the current becomes 1.6mAh
static void stop_servo(void)
{
app_pwm_disable(m_pwm_t);
nrf_drv_gpiote_out_task_disable(SERVO_PIN);
uint32_t err_code = app_pwm_uninit(m_pwm_t);
APP_ERROR_CHECK(err_code);
nrf_gpio_cfg_output(SERVO_PIN);
nrf_gpio_pin_set(SERVO_PIN);
}
-----------------------------after above stop_servo() the current becomes 0.3 to 0.9mAh
The problem is that before I declare start_servo() first time,
the current maintain 0.4mAh steadily, but after start_servo() and stop_servo(),
the current maintain 0.3mAh to 0.9mAh rapidly.
I wanna get 0.4mAh or less when I don't use servo. How can I fix it?