I take the external PWM signal, I directly used the method of controlling the GPIOTE register to be successful.
But I can't achieve the same effect using the program in the standard SDK.
An error occurs when I declare using the standard SDK. Is there a way to program using the standard SDK?
PS: SDK version: nRF 16.0.0
there is successful
NRF_GPIOTE->CONFIG[PWM_INPUT_GPIOTE_RISE_EDGE_CH] = GPIOTE_CONFIG_MODE_Event << GPIOTE_CONFIG_MODE_Pos | GPIOTE_CONFIG_POLARITY_LoToHi << GPIOTE_CONFIG_POLARITY_Pos | pin_number << GPIOTE_CONFIG_PSEL_Pos | GPIOTE_CONFIG_OUTINIT_Low << GPIOTE_CONFIG_OUTINIT_Pos; // ignored when gpio is set to event mode NRF_GPIOTE->CONFIG[PWM_INPUT_GPIOTE_FALL_EDGE_CH] = GPIOTE_CONFIG_MODE_Event << GPIOTE_CONFIG_MODE_Pos | GPIOTE_CONFIG_POLARITY_HiToLo << GPIOTE_CONFIG_POLARITY_Pos | pin_number << GPIOTE_CONFIG_PSEL_Pos | GPIOTE_CONFIG_OUTINIT_High << GPIOTE_CONFIG_OUTINIT_Pos; // ignored when gpio is set to event mode
there is failure
err_code = nrfx_gpiote_in_init(pin_number, &gpiote_LoToHi_cfg, PWM_emtpy_handler); //Low to High edge APP_ERROR_CHECK(err_code); err_code = nrfx_gpiote_in_init(pin_number, &gpiote_HiToLo_cfg, PWM_emtpy_handler); //High to low edge APP_ERROR_CHECK(err_code);