Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

SAADC changing value range (signed to unsigned)

Hello Nordic Support,

I am using SAADC on nRF52840 with nRF5_SDK_15.3.0_59ac345

I use the following configurations:

{ 
    .resolution         = (nrf_saadc_resolution_t)NRFX_SAADC_CONFIG_RESOLUTION, // 12 bits
    .oversample         = (nrf_saadc_oversample_t)NRFX_SAADC_CONFIG_OVERSAMPLE, // 0
    .interrupt_priority = NRFX_SAADC_CONFIG_IRQ_PRIORITY,                       // 5
    .low_power_mode     = NRFX_SAADC_CONFIG_LP_MODE                             // 0
}


{                                                   
    .resistor_p = NRF_SAADC_RESISTOR_DISABLED,      
    .resistor_n = NRF_SAADC_RESISTOR_DISABLED,      
    .gain       = NRF_SAADC_GAIN1_6,                
    .reference  = NRF_SAADC_REFERENCE_INTERNAL,     
    .acq_time   = NRF_SAADC_ACQTIME_10US,           
    .mode       = NRF_SAADC_MODE_SINGLE_ENDED,      
    .burst      = NRF_SAADC_BURST_DISABLED,         
    .pin_p      = (nrf_saadc_input_t)(NRF_SAADC_INPUT_AIN1),       
    .pin_n      = NRF_SAADC_INPUT_DISABLED          
}

The SAADC value, as I have been using is signed. I wonder if Nordic will later support unsigned value, or you will not? Or are there any ways to convert from signed SAADC to unsigned SAADC?

Thank you and best regards,

           Duy

Parents Reply Children
No Data
Related