25 Replies Latest reply on Jun 20, 2019 4:17 PM by arunraghu1

    i2c not working after installing explore-nfc

    julien.imagefields

      Hi,

       

      I'm currently trying to work with an explore-nfc device and a Adafruit i2c 16x2 RGB LCD plate on a Raspberry Pi B Rev. 2 and turning on Raspbian Wheezy.

       

      After installing the LCD plate, all is fine, my test software can take controll on the LCD and the i2cdetect -y 1 command returns :

       

            0 1 2  3 4 5 6 7 8  9 a  b c d e  f
      00:          -- -- -- -- -- -- -- -- -- -- -- -- --
      10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
      20: 20 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
      30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
      40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
      50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
      60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
      70: -- -- -- -- -- -- -- --

       

      But when i install & compile the source for explore-nfc, the i2c is not working properly, if I connect the LCD plate, my test software does'nt work anymore and the i2cdetect -y 1 command returns :

       

             0  1   2   3   4   5  6   7   8   9  a   b   c   d   e  f
      00:               03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f
      10: 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f
      20: 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f
      30: 30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f
      40: 40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f
      50: 50 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f
      60: 60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f
      70: 70 71 72 73 74 75 76 77

       

      Can you see what kind of problem is it? I'm not linux, Raspberry or Hardware expert so I don't know what kind of investigation I can make to target the problem.

       

      Thanks in advance and have a great day

        • Re: i2c not working after installing explore-nfc
          clem57

          Please specify where and what you used for NFC library. There are several sources/versions. Also what version or source of the nfc card. My guess is the I2C interface address are conflicting.

          Clem

          • Re: i2c not working after installing explore-nfc
            michaelneurohr

            Next week there will be a release of the new version of the EXPLORE-NFC software. This solves the issue with the I2C bus. By end of the week you'll find the new version here:

            NFC Reader Library|NXP

             

            The URLs on the element14 pages will be updated as well.

            EXPLORE-NFC

             

            Michael

              • Re: i2c not working after installing explore-nfc
                tira

                Hi Michael,

                here I'm still facing the same issue

                 

                pi@raspberrypi1:~ $ i2cdetect -y 1

                      0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f

                00:          03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 

                10: 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 

                20: 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 

                30: 30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f 

                40: 40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 

                50: 50 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f 

                60: 60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f 

                70: 70 71 72 73 74 75 76 77   

                 

                with:

                 

                ii  libneardal-dev                                 0.14.3-1                     armhf                        C APIs for Neard NFC daemon

                ii  libneardal0                                    0.14.3-1                     armhf                        C APIs for Neard NFC daemon

                ii  neard-explorenfc                               1.2-1                        armhf                        NFC daemon for the Raspberry Pi and NXP Explore-NFC board

                 

                which seams the latest available on NFC Reader Library|NXP

                 

                Can you please detail which version is supposed to fix that issue?

                 

                thanks,

                Simone

                  • Re: i2c not working after installing explore-nfc
                    hamü

                    Hello Tira

                     

                    I am facing the same issue as you are describing here. Have you been able to find a solution meanwhile?

                     

                    hamü

                      • Re: i2c not working after installing explore-nfc
                        michaelschober

                        Hi hamü,

                        If you take a look at the schematics of the Explore-NFC Board there is a shortcut between the I2C SDA Pin and the SSEL Pin.

                        This is no problem for the Spi Comunication because a low signal has a higher priority than a high, but it's a big problem for the I2C connection because always when you make a SSEL you pull the SDA pin to low, out of that reason the I2C Interface does not work.

                        Try to connect your Raspberry Pi to the Explore-NFC board with wires but without connecting  Pin 3(SDA) and Pin 5(SCL) then everything should work.

                         

                        Here is the link of the schematics of the board:

                        https://www.element14.com/community/servlet/JiveServlet/downloadBody/76384-102-1-316107/EXPLORE-NFC(V1.6)%20SCH%20131100…

                          • Re: i2c not working after installing explore-nfc
                            hamü

                            Hi Michael,

                             

                            Thank you for your quick response.

                            I first was using the information about the pins in this thread Question about  EXPLORE-NXP NFC expansion board and used wires the first time to connect everything needed for using the I2C interface. Second time I tried it with the connector instead of cables.

                             

                            I had installed

                            neard-explorenfc                               1.2-1                        armhf                        NFC daemon for the Raspberry Pi and NXP Explore-NFC board

                            libneardal0                                    0.14.3-1                     armhf                        C APIs for Neard NFC daemon

                             

                            and now also installed

                             

                            libneardal-dev                                 0.14.3-1                     armhf                        C APIs for Neard NFC daemon

                             

                            How is I2C supposed to work when there is no connection to the I2C bus (pin 3 and pin 5)?

                             

                            The reason why I want to use I2C and not SPI is that I want to connect a touch display as well. So in my eyes it would have been the easiest solution to use I2C for NFC-Explore and SPI for the display as the latter also uses the pins 19, 21, 23 and 24 and is therefore overlapping with the pins I need for the NFC-explore board. But I am a novice when it comes to this. I would would probably need to change some code of the NFC-Explore board or the display to use the second SPI Interface (SPI1) with pins 40,38, etc. instead of SPI0, right? Or wait, I could connect them to the same SPI pins and then use CE to switch between them?! Not sure which of all these would be the easiest solution. Maybe using CE or I2C.

                             

                            Display:

                            Display      Raspberry Pi          Info
                            ----------------------------------
                            GND          GND                   Ground
                            5V           5V                    5V Power Supply
                            LCD-LED      GPIO18                Display Backlight, can be set to GPIO12 with Jumper BL
                            LCD-RST      GPIO23                Display Reset
                            LCD-DC       GPIO24                Display Command/Data Select (DC/RS), Jumper IO24-RS
                            LCD-CS       GPIO8 (CE0) (pin24)   Display Chip Select
                            ADS-CS       GPIO7 (CE1)           Touchcontroller Chip Select
                            ADS-IRQ      GPIO25                Touchcontroller Interrupt Output
                            MISO         GPIO9 (MISO) (pin21)  SPI Master-In Slave-Out
                            MOSI         GPIO10 (MOSI) (pin19) SPI Master-Out Slave-In
                            SCK          GPIO11 (SCK) (pin23)  SPI Clock

                              • Re: i2c not working after installing explore-nfc
                                michaelneurohr

                                Hi Hamü,

                                 

                                Michael's response was based on the assumption that you want to use the EXPLORE-NFC in a similar configuration like the OP.

                                The software for the EXPLORE-NFC does not support the use in I2C configuration, although the board can be configured to I2C.

                                 

                                However, NXP just released the NFC Reader Library including many examples for Linux. This software can be configured to I2C and does support the EXPLORE-NFC in I2C configuration.

                                it can be found here. Or use the direct link. NFC Reader Library for Linux v4.040.05.011646.

                                The according user manual is: http://cache.nxp.com/documents/application_note/AN11802.pdf

                                 

                                HTH,

                                Michael

                                  • Re: i2c not working after installing explore-nfc
                                    hamü

                                    Hi Michael,

                                     

                                    Thanks! The direct link results in NFC Reader Library for Linux V4.010.03.001609, which seems to be the wrong version.

                                    You mean the third link on this download website for the NFC library, right?

                                    NFC Reader Library v4.040.05.011646

                                    R1 for KDS including all software examples

                                     

                                    Or the first?

                                    NFC Reader Library v4.040.05.011646 R1 for PNEV512B including all software examples.

                                    The package contains support for PNEV512B evaluation board connected to LPCXpresso LPC1769 or LPCXpresso LPC11U68

                                     

                                      • Re: i2c not working after installing explore-nfc
                                        michaelneurohr

                                        Hi Hamü,

                                         

                                        actually the download link is defect. I'll take care for it immediately and come back to you.

                                         

                                        Michael

                                          • Re: i2c not working after installing explore-nfc
                                            hamü

                                            Thanks Michael! Are you still working on it?

                                              • Re: i2c not working after installing explore-nfc
                                                michaelneurohr

                                                Yes, our IT is still working on it. I'll post a message once this is fixed.

                                                  • Re: i2c not working after installing explore-nfc
                                                    hamü

                                                    Hello Michael!

                                                    Can you predict how long that might take?

                                                    I just found this which seems to be correct:

                                                    on this website:

                                                    https://nxp.flexnetoperations.com/control/frse/download?agree=Accept&element=8359537

                                                     

                                                    and then in the category PN512 there is also:

                                                    but that seems to be the one without I2C support, right?

                                                     

                                                    By the way, what exactly did you mean with "although the board can be configured to I2C". What kind of configuration has to be done regarding the board?

                                                     

                                                    Thanks again for your help and support! I really appreciate it!

                                                     

                                                    Hamü

                                                      • Re: i2c not working after installing explore-nfc
                                                        michaelneurohr

                                                        Hi Hamü,

                                                         

                                                        Yes, the SW3693.zip from [1] is the correct download. The download for PN512 only contains software configured to be used on microcontrollers.

                                                         

                                                        Michael

                                                         

                                                        [1] https://nxp.flexnetoperations.com/control/frse/download?element=8359537

                                                          • Re: i2c not working after installing explore-nfc
                                                            hamü

                                                            Hi Michael

                                                             

                                                            Okay, thanks a lot!

                                                             

                                                            By the way, what exactly did you mean with "although the board can be configured to I2C". What kind of configuration has to be done regarding/on the board?

                                                             

                                                            Hamü

                                                            • Re: i2c not working after installing explore-nfc
                                                              noeldkendall

                                                              I have downloaded SW3693.zip and am trying to build on Raspbian Jessie image 27-06-21.

                                                               

                                                              Getting compile errors in NfcrdlibEx5_ISO15693 as below. Everything else from that zip compiles cleanly.

                                                               

                                                              [ 87%] Building C object NfcrdlibEx5_ISO15693/CMakeFiles/NfcrdlibEx5_ISO15693.dir/NfcrdlibEx5_ISO15693.c.o
                                                              /Volumes/workvol/workspaces/raspbian/work/NxpNfcRdLib-201708221632/NfcrdlibEx5_ISO15693/NfcrdlibEx5_ISO15693.c: In function ‘NfcrdlibEx5_ISO15693’:
                                                              /Volumes/workvol/workspaces/raspbian/work/NxpNfcRdLib-201708221632/NfcrdlibEx5_ISO15693/NfcrdlibEx5_ISO15693.c:209:43: error: ‘phacDiscLoop_Sw_DataParams_t’ has no member named ‘sTypeVTargetInfo’
                                                                               phApp_Print_Buff(sDiscLoop.sTypeVTargetInfo.aTypeV[0].aUid, 0x08);
                                                                                                         ^
                                                              /Volumes/workvol/workspaces/raspbian/work/NxpNfcRdLib-201708221632/NfcrdlibEx5_ISO15693/NfcrdlibEx5_ISO15693.c:212:47: error: ‘phacDiscLoop_Sw_DataParams_t’ has no member named ‘sTypeVTargetInfo’
                                                                               memcpy(aReceivedUid, sDiscLoop.sTypeVTargetInfo.aTypeV[0].aUid, 0x08);
                                                                                                             ^
                                                              /Volumes/workvol/workspaces/raspbian/work/NxpNfcRdLib-201708221632/NfcrdlibEx5_ISO15693/NfcrdlibEx5_ISO15693.c:215:50: error: ‘phacDiscLoop_Sw_DataParams_t’ has no member named ‘sTypeVTargetInfo’
                                                                               if (DisplayCardTypeInfo(sDiscLoop.sTypeVTargetInfo.aTypeV[0].aUid) == PH_ERR_SUCCESS)
                                                                                                                ^
                                                              /Volumes/workvol/workspaces/raspbian/work/NxpNfcRdLib-201708221632/NfcrdlibEx5_ISO15693/NfcrdlibEx5_ISO15693.c:226:62: error: ‘salI15693’ undeclared (first use in this function)
                                                                                       status = phalI15693_ReadSingleBlock(&salI15693,
                                                                                                                            ^
                                                              /Volumes/workvol/workspaces/raspbian/work/NxpNfcRdLib-201708221632/NfcrdlibEx5_ISO15693/NfcrdlibEx5_ISO15693.c:226:62: note: each undeclared identifier is reported only once for each function it appears in
                                                              /Volumes/workvol/workspaces/raspbian/work/NxpNfcRdLib-201708221632/NfcrdlibEx5_ISO15693/NfcrdlibEx5_ISO15693.c:227:29: error: ‘PHAL_I15693_OPTION_OFF’ undeclared (first use in this function)
                                                                                           PHAL_I15693_OPTION_OFF,
                                                                                           ^
                                                              /Volumes/workvol/workspaces/raspbian/work/NxpNfcRdLib-201708221632/NfcrdlibEx5_ISO15693/NfcrdlibEx5_ISO15693.c:286:26: error: ‘PHPAL_SLI15693_FLAG_NBSLOTS’ undeclared (first use in this function)
                                                                                       (PHPAL_SLI15693_FLAG_NBSLOTS | PHPAL_SLI15693_FLAG_DATA_RATE | PHPAL_SLI15693_FLAG_INVENTORY),
                                                                                        ^
                                                              /Volumes/workvol/workspaces/raspbian/work/NxpNfcRdLib-201708221632/NfcrdlibEx5_ISO15693/NfcrdlibEx5_ISO15693.c:286:56: error: ‘PHPAL_SLI15693_FLAG_DATA_RATE’ undeclared (first use in this function)
                                                                                       (PHPAL_SLI15693_FLAG_NBSLOTS | PHPAL_SLI15693_FLAG_DATA_RATE | PHPAL_SLI15693_FLAG_INVENTORY),
                                                                                                                      ^
                                                              /Volumes/workvol/workspaces/raspbian/work/NxpNfcRdLib-201708221632/NfcrdlibEx5_ISO15693/NfcrdlibEx5_ISO15693.c:286:88: error: ‘PHPAL_SLI15693_FLAG_INVENTORY’ undeclared (first use in this function)
                                                                                       (PHPAL_SLI15693_FLAG_NBSLOTS | PHPAL_SLI15693_FLAG_DATA_RATE | PHPAL_SLI15693_FLAG_INVENTORY),

                                                               

                                        • Re: i2c not working after installing explore-nfc
                                          arunraghu1

                                          Hello,

                                           

                                          I am currently working with the explore nfc and i have the same issue. with the NFC connected I am not able to use the I2C. Is there any software fix for this issue? was anyone else able to solve the problem?