6 Replies Latest reply on Mar 13, 2017 4:36 PM by Intel Corporation

    Enabling ADC on arduino101 for Zephyr OS

    Bharani.Bhuvanagiri

      Hi,

       

      I need to run an ADC application on Arduino101, for Zephyr OS. I need the Kconfig configuration to add in prj.conf file to enable ADC driver.

      We need to build two applications for for Arduino101 to run zephyr. one for x86-processor, 2nd for sensor core

      According to the Supported Features in the zephyr documentation

      Link: https://www.zephyrproject.org/doc/boards/x86/arduino_101/doc/board.html

      ADC is connected to sensor core (32 MHz Argonaut RISC Core (ARC)* EM processor), so in the application that goes onto ARC core I have enabled ADC
      using CONFIG_ADC=y.

      Board hangs during boot time and I do not have any logs to trace the issue. I need a correct combination of KConfig configurations for X86-core and
      Sensor-core so that ADC is up and running on Arduino-101

        • 1. Re: Enabling ADC on arduino101 for Zephyr OS
          Intel Corporation
          This message was posted on behalf of Intel Corporation

          Hello Bharani,

           

          Thank you for interest in the Intel® Curie™ Boards.

           

          I understand you are trying to build two applications, one of them for the ARC processor.

           

          The ADC driver is, as you mentioned, only functional for the ARC processor.

           

          From what I read, you have already developed the two applications, one of them with the CONFIG_ADC=y command. What is not clear to me is if both applications worked accordingly before adding the ADC enabling command.

           

          Are you willing to share more information about your project and what you are trying to achieve?

           

          Could you please share a little bit more about the steps that you followed during the Kernel Configuration process?

           

          Are you in any way creating a custom build or performing a kernel modification?

           

          I’ll be waiting for your response.

           

          Regards,
          Andres V.

          • 2. Re: Enabling ADC on arduino101 for Zephyr OS
            Bharani.Bhuvanagiri

            Hi Andres,

             

            Both applications worked properly before adding the CONFIG_ADC=y.

            The applications are nothing but a basic Hello world application.

            Application for X86:

            printk("Hello from x86 app %s\n", CONFIG_ARCH);

             

            Application for Sensor core:

            k_sleep(1000);

            printk("Hello from sensor core %s\n", CONFIG_ARCH);

             

            prj_x86.conf:

            CONFIG_PRINTK=y

            CONFIG_ARC_INIT=y

            CONFIG_SYS_LOG_ARC_INIT_LEVEL=4

             

            prj_arc.conf:

            #I tried 4 different configurations for arc

            1) #Nothing in the configuration

            Board successfully booted and was able to see both the printk's

             

                 Arduino console:

                 ***** BOOTING ZEPHYR OS v1.7.99 - BUILD: Mar  8 2017 06:56:01 *****
                 Hello from x86 app x86
                 Hello from sensor core arc

            2) Zephyr did not boot with this config option - ADC Enabled

            CONFIG_ADC=y

             

            3) Zephyr did not boot with following configuration also

            CONFIG_PRINTK=y

            CONFIG_STDOUT_CONSOLE=y

            CONFIG_SERIAL=n

            CONFIG_ADC=y

             

            4) Zephyr did not boot with following configuration also

            CONFIG_PRINTK=y

            CONFIG_STDOUT_CONSOLE=y

            CONFIG_SERIAL=y

            CONFIG_ADC=y

             

            Before enabling the ADC, the application has worked perfectly.

             

            Thanks,

            Bharani

             

            • 3. Re: Enabling ADC on arduino101 for Zephyr OS
              Bharani.Bhuvanagiri

              I am trying to run Zephyr Operating system on Arduino-101.

              As part of some experiment I want ADC to be enabled so that I can use Analog input pins and read some data from it.

              Zephyr is a tiny OS that is highly configurable Linux kernel with put a file system.

              Also I need some more details about SPI clock scaling factor or clock frequency configuration options so that I can run SPI communication between a slave and Arduino.

              • 4. Re: Enabling ADC on arduino101 for Zephyr OS
                Intel Corporation
                This message was posted on behalf of Intel Corporation

                Hello Bharani,

                Thank you for the information provided.

                I’ll be needing more time to perform the corresponding test and come up with information that you may find useful.

                Thank you for your patience.

                Regards,
                Andres V.

                • 5. Re: Enabling ADC on arduino101 for Zephyr OS
                  Bharani.Bhuvanagiri

                  Hi Andres,

                   

                  I seem to have solved the problem , I followed steps mentioned in the Link below.

                  I think my issue was better applicable the Zephyr forum.

                  ADC was not running because of SDK used for Zephyr.

                   

                  Link:  https://jira.zephyrproject.org/browse/ZEP-1882

                   

                  Thanks,

                  Bharani

                  1 of 1 people found this helpful
                  • 6. Re: Enabling ADC on arduino101 for Zephyr OS
                    Intel Corporation
                    This message was posted on behalf of Intel Corporation

                    Hello Bharani,

                    I’m glad to hear that you could solve the issue.

                    Thank you for sharing your experience with the community, we really appreciate it.

                    Have a nice day.

                    Regards,
                    Andres V.