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

How to sequentially read from multiple ADC pins?

Hi,

I have gone through the saadc example program supplied along with SDK15. But the issue is that, the example features a single channel ADC read. I tried to modify this example program but whenever i try to change the ADC channel, it hits a hard fault.

My requirement is to read 2 ADC channels, (say AN0 and AN1) every 10 mSec.

Thanks and regards,

Hari

Parents
  • Hi  Jørgen Holmefjord,

    I have gone through the GitHub ecample that you have provided and now i got the multi channel ADC section working.

    Now i am trying to integrate the ADC program to HID mouse example and it builds without any error. Here I included the ADC initialization after all other initializations in the BID example program.

    But when control executes "saadc_sampleing_event_init();" I get a "<error> app: Fatal error" in RTT Viewer.

    What could be causing this error?

    Is it something related to timer?

    Thanks and regards,
    Hari

Reply
  • Hi  Jørgen Holmefjord,

    I have gone through the GitHub ecample that you have provided and now i got the multi channel ADC section working.

    Now i am trying to integrate the ADC program to HID mouse example and it builds without any error. Here I included the ADC initialization after all other initializations in the BID example program.

    But when control executes "saadc_sampleing_event_init();" I get a "<error> app: Fatal error" in RTT Viewer.

    What could be causing this error?

    Is it something related to timer?

    Thanks and regards,
    Hari

Children
No Data
Related