Hello, I am trying to modify my code by adding lines from a PWM example code.
However, I keep facing the same error message.
.\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol nrf_drv_pwm_init (referred from main.o).
.\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol nrf_drv_pwm_init (referred from main.o).
code for this part is below,
void pwm_update_duty_cycle(uint8_t duty_cycle)
{
// Check if value is outside of range. If so, set to 100%
if(duty_cycle >= 100)
{
seq_values->channel_0 = 100;
}
else
{
seq_values->channel_0 = duty_cycle;
}
nrf_drv_pwm_simple_playback(&m_pwm0, &seq, 1, NRF_DRV_PWM_FLAG_LOOP);
}
static void pwm_init(void)
{
nrf_drv_pwm_config_t const config0 =
{
.output_pins =
{
OUTPUT_PIN, // channel 0
NRF_DRV_PWM_PIN_NOT_USED, // channel 1
NRF_DRV_PWM_PIN_NOT_USED, // channel 2
NRF_DRV_PWM_PIN_NOT_USED, // channel 3
},
.irq_priority = APP_IRQ_PRIORITY_LOWEST,
.base_clock = NRF_PWM_CLK_1MHz,
.count_mode = NRF_PWM_MODE_UP,
.top_value = 100,
.load_mode = NRF_PWM_LOAD_INDIVIDUAL,
.step_mode = NRF_PWM_STEP_AUTO
};
// Init PWM without error handler
APP_ERROR_CHECK(nrf_drv_pwm_init(&m_pwm0, &config0, NULL));
}
I included these headers.
#include "nrf_drv_pwm.h"
#include "app_util_platform.h"
#include "nrf_drv_clock.h"
And also checked whether they are contained in the project.



Does anyone have a clue about my problem, or can you help me to solve this issue?
