element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
EXPLORE-NFC
  • Products
  • Dev Tools
  • EXPLORE-NFC
  • More
  • Cancel
EXPLORE-NFC
Forum Explore-NFC on Raspberry Compute Module
  • Blog
  • Forum
  • Documents
  • Events
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join EXPLORE-NFC to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 2 replies
  • Subscribers 10 subscribers
  • Views 542 views
  • Users 0 members are here
  • raspberry
  • pi
  • compute
  • explore-nfc
  • nfc
  • module
Related

Explore-NFC on Raspberry Compute Module

Former Member
Former Member over 10 years ago

Hi all,

 

we would like to use the Explore-NFC with the Raspberry Compute Module.

It did not work, so I started to debug the C library provided by NXP and found out that the library is waiting for an interrupt which does not happen.

So I assume the interrupt registers are different on the Raspberry Compute Module.

 

Does someone know how to port the Explore-NFC library to the  Raspberry Compute Module?

Did someone ported the Explore-NFC library to the  Raspberry Compute Module?

Does someone has experience with the Explore-NFC board on a Raspberry Compute Module?

 

-david

  • Sign in to reply
  • Cancel
  • michaelneurohr
    michaelneurohr over 10 years ago

    Hi David,

    the software indeed is using interrupt signals of the PN512 on the EXPLORE-NFC.

    The interrupt line of the PN512 is connected to pin 16 of the Raspberry Pi.

     

    Just make sure, the IRQ pin is connected to the same GPIO on the compute module.

     

    Michael

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 10 years ago in reply to michaelneurohr

    Hi Michael, David,

     

    I'll confirm on behalf on David that the IRQ is routed to the same BCM2835 pin:

    Raspberry Pi model-B header pin-16 used for the PN512 IRQ line goes to ball C5 of the BCM2835 called GPIO23

    On the Compute Module hardware the PN512 interrupt goes to CM pin-77 which is GPIO23.

     

    With the same code installed on each platform

    sudo raspi-gpio get

    The B+ SPI pins are correctly configured

      GPIO 08: level=1 fsel=4 alt=ALT0 func=SPI0_CE0_N

      GPIO 09: level=0 fsel=4 alt=ALT0 func=SPI0_MISO

      GPIO 10: level=0 fsel=4 alt=ALT0 func=SPI0_MOSI

      GPIO 11: level=0 fsel=4 alt=ALT0 func=SPI0_SCLK

     

    While on the CM they're wrong

      GPIO 08: level=0 fsel=0 alt=    func=INPUT

      GPIO 09: level=0 fsel=4 alt=ALT0 func=SPI0_MISO

      GPIO 10: level=0 fsel=4 alt=ALT0 func=SPI0_MOSI

      GPIO 11: level=1 fsel=1 alt=    func=OUTPUT

     

    So the explorenfc code on the CM hasn't written to the PN512.


    On the Pi-B+ that IRQ line reads back as          GPIO 23: level=0 fsel=0 alt=    func=INPUT

    On the CM it's                                                 GPIO 23: level=1 fsel=0 alt=    func=INPUT

     

    The PN512 has a programmable IRQ polarity and push-pull or open-drain operation. According to the default values (CommIEnReg =10000000b and DivIEnReg = 00000000b) it'll default to inverted open-drain, the comment in CommIEnReg says it therefore floats. In both the Explorencf board and David's Compute Module design, the IRQ doesn't have a discrete pull-up or pull-down so either the PN512 is configured for push-pull or the BCM GPIO pull-up is enabled, hopefully it's push-pull as the pull-up is weak and rise times would be very slow.

    The IRQ is asserted on the B+ and negated on the CM, but is the difference due to a pull-up configuration difference on the BCM or because the CM hasn't actually written to the PN512 yet due to the incorrect GPIO configuration?


    I've not seen the setup code for the PN512 but I'd hope it's reset then configured before checking the IRQ line.

     

    Experimenting a little more. With the explorenfcd running you can correct the GPIO configuration:

    sudo raspi-gpio set 8 a0

    sudo raspi-gpio set 11 a0

     

    Then stop and re-start the daemon sudo service neard-explorenfc stop and obviously sudo service neard-explorenfc start, results in the GPIO being messed up again, looks like starting the daemon on a CM rather screws the GPIO up?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube