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

using adc5, adc6 and adc7 in nrf9160

Hi

i am able to work with adc 0 for nrf9160 custom borad now i want to use adc 5 to adc 7 simultanuously can you please guide me to settings which i need to modify or a example which uses all adc at same time. what things to be keep in mind and how to do it?

Parents Reply
  • great thanks for reply i was able to use it but i done it in a complex way thanks you make it easier for me. one more thing do we need to define below configuration every time when we try to access differnt adc channel in different functions?

    	const struct adc_sequence sequence = {
    		.channels = BIT(ADC_1ST_CHANNEL_ID) | BIT(ADC_2ND_CHANNEL_ID) | BIT(ADC_3RD_CHANNEL_ID) | BIT(ADC_4TH_CHANNEL_ID),
    		.buffer = m_sample_buffer,
    		.buffer_size = sizeof(m_sample_buffer),
    		.resolution = ADC_RESOLUTION,
    	};
    

Children
  • Hi,

     

    Y0g1 said:
    great thanks for reply i was able to use it but i done it in a complex way thanks you make it easier for me. one more thing do we need to define below configuration every time when we try to access differnt adc channel in different functions?

    You can set that as an input to the function you're calling for instance. Or make specific functions matching your sampling requirements.

    Depends on how you want it to look and integrate into the rest of your application.

     

    Kind regards,

    Håkon 

Related