This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

SAADC channel input select/nRF52832/

The function nrf_drv_saadc_channel_init() in nrf_drv_saadc.c does channel initialization by calling function nrf_saadc_channel_init() which will set PSELN and PSELP of the respective channel. However after the returning from the function, the function nrf_drv_saadc_channel_init() again will reinitialize the PSELN and PSELP to NRF_SAADC_INPUT_DISABLED. Why?

It makes sense to disable first and then configure by calling nrf_saadc_channel_init() which initializes to the right value.

Appreciate the response.

Parents
  • This seems related PAN 28 infocenter.nordicsemi.com/.../anomaly_832_28.html

    Looking at the code it looks like they are disabling the input and scanning each line by enabling each channel individually to emulate a scan mode in the interrupt handler SAADC_IRQHandler.

    This will go away when the PAN is fixed.

  • Nordic is PAN-28 fixed in Rev B,C and Rev 1 silicon as I currently have NRF52_PAN_28 defined in my build? I am using Rev B and C for pre production and Rev 1for production. My application requires scanning of the ADC channels and I would prefer to have the ADC do this than emulate it with interrupts.

Reply
  • Nordic is PAN-28 fixed in Rev B,C and Rev 1 silicon as I currently have NRF52_PAN_28 defined in my build? I am using Rev B and C for pre production and Rev 1for production. My application requires scanning of the ADC channels and I would prefer to have the ADC do this than emulate it with interrupts.

Children
No Data