Multiple ADC reading - NCS

Hello everyone!

I'm trying to read 4 channels of ADC, and for future production, I'd have to read all 8.

There is two channels example, yet it isn't scalable. I'm thinking about building a dynamic setup based on the example, but it doesn't go so well due to the limits of specific macros in the given example code.

Parents Reply
  • I updated the code, and now it's compiling well, but when trying to see the nRF Terminal, I'm getting the following logs.

    *** Booting Zephyr OS build v2.7.99-ncs1-1  ***
    Device binded to ADC_0
    [00:00:00.257,568] <err> os: ***** MPU FAULT *****
    [00:00:00.257,568] <err> os:   Instruction Access Violation
    [00:00:00.257,568] <err> os: r0/a1:  0x00000000  r1/a2:  0x20001958  r2/a3:  0x54f7fab5
    [00:00:00.257,568] <err> os: r3/a4:  0x20001958 r12/ip:  0x00000000 r14/lr:  0x00000407
    [00:00:00.257,598] <err> os:  xpsr:  0x61000000
    [00:00:00.257,598] <err> os: Faulting instruction address (r15/pc): 0x54f7fab4
    [00:00:00.257,598] <err> os: >>> ZEPHYR FATAL ERROR 0: CPU exception on CPU 0
    [00:00:00.257,629] <err> os: Current thread: 0x20000420 (main)
    [00:00:01.207,336] <err> fatal_error: Resetting system

    The code now:

    adc_4_v3.zip

Children
Related