5 Replies Latest reply on Sep 29, 2015 11:29 AM by DiegoV_Intel

    Recognized board type

    highmore

      hello everyone!I want to know how edison recognied the board type between miniboard and arduino board.Can you give me detail doc or function.

      thank you!

        • 1. Re: Recognized board type
          DiegoV_Intel

          Hello highmore,

           

          One way to recognize the expansion board used is through the muxes. For example, the gpio214 is only available in the Arduino Expansion Board so if you try to use it in the Mini-Breakout Board you will get an error. The following Python example shows the board used by checking the gpio214, you might want to take a look at it: Edison/BoardDetector.py at master · MakersTeam/Edison · GitHub.

           

          As you can check here: mraa/intel_edison_fab_c.c at master · intel-iot-devkit/mraa · GitHub, the MRAA library uses this same method to check the expansion board used.

           

          Regards,

          Diego.

          • 2. Re: Recognized board type
            highmore

            OK! Thank you for you reply ! my real question is : I can't use ADC with mraa library.I follow ardiuno expansion board's  schematic the same pin ,same ADC chip(ADS7951) to designe myself circuit(it is like a miniboard connect other modules),but it can't work by use mraa.aio,,because it always report gpio: Failed to write 214 to export(as you mention above gpio214 is no exist in miniboard).I want to konw how to initalize it.is there any other library suitable for miniboard ?

            • 3. Re: Recognized board type
              DiegoV_Intel

              Hello highmore,

               

              The use of the ADC in the MRAA library is based on the Arduino Expansion Board architecture. Since you are not using it, you are getting the gpio214 error message. You are basically using a "new board" that MRAA is not made for. Unfortunately there are no other libraries. You should write a new library for your custom board.

               

              The ADC ADS7951 uses a SPI interface so you should make a library to use the SPI interface. MRAA needs to know what board is being used so it can configure the muxes properly. You can check in detail the MRAA library and write your own library based on it. You could look for the code after the mux configuration part is made (because you don't need it in your custom board) and check how it manages the ADC.

               

              I think SparkFun has another library for their ADC block. You can check how they made the library and try to write a new one for your custom board.

               

              These would be my suggestions for you.

               

              Regards,

              Diego.

              • 4. Re: Recognized board type
                highmore

                Can I use the mraa.spi to initialize the SPI in mini breakout  board? And the GP109,110,114,115 are control the bus spi2 or spi5? In this document,it belong to spi2http://download.intel.com/support/edison/sb/edisonmodule_hg_331189004.pdf.But in another document(the schematic of mini breakout board),it belong to spi5.

                • 5. Re: Recognized board type
                  DiegoV_Intel

                  Hello highmore,

                   

                  You should be able to use the SPI in the Mini-Breakout Board with MRAA.

                   

                  On the other hand, notice that the Edison Hardware Guide mention the SPI interface as SPI2, but in the Mini-Breakout Board schematic appears as SSP5 (not SPI5). SSP means Synchronous Serial Port. The SPI (Serial Peripheral Interface) is supported by the SSP controller. So, they are the same interface but in the Hardware Guide it appears as SPI2 and in the schematic appears as SSP5, but they are the same.

                   

                  Regards,

                  Diego.