PN512 SPI write issue

cancel
Showing results for 
Search instead for 
Did you mean: 

PN512 SPI write issue

Jump to solution
211 Views
Contributor II

Hello everyone,

My partner and I are both working with a PN512 and we trying to communicate with it via SPI.

While sending values, we have found a very weird issue maybe you can help us with.
We are sending all the data correctly. However, when we try to read them (after writting each one) we always get the registers' reset value.

We have checked the following items to discard possible failure causes:

  • The SPI lines are working fine. We have checked SCK, MOSI, MISO and CS with an oscilloscope and all 4 are working as spected .
  • The crystal is oscillating OK.
  • SPI timing is OK.
  • Address bit shifting and setting/clearing the command bit (read/write) is also correctly done.
  • All physical pads are correctly soledered and routed in the board.

Do we have to configure any special PN512's register for us to be able to modify its registers? Is there something we are not doing/configuring prior to send all data?

Hope someone could help us.

Kind regards,

Jose Carlos.

Labels (1)
1 Solution
57 Views
Contributor II

Hi Kan Li,

thanks for the support. My partner solved the issue by himself. The problem was that if we configure the pin for the chipselect as SS (pin 5, SPI0, MuxAlt2) in our KL17 the line goes up in every exchange by itself so we configure it as a simple GPIO to control the line and now we can write in PN512.

Hope this information helps

Kind regars, Jose Carlos

View solution in original post

0 Kudos
3 Replies
57 Views
NXP TechSupport
NXP TechSupport

Hi Jose,

There is no additional setup needed to use SPI port, just make sure you select the right interface.

pastedImage_1.png

and follow the timing requirements listed in 9.2 in the data sheet.https://www.nxp.com/docs/en/data-sheet/PN512.pdf 


Have a great day,
Kan

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

58 Views
Contributor II

Hi Kan Li,

thanks for the support. My partner solved the issue by himself. The problem was that if we configure the pin for the chipselect as SS (pin 5, SPI0, MuxAlt2) in our KL17 the line goes up in every exchange by itself so we configure it as a simple GPIO to control the line and now we can write in PN512.

Hope this information helps

Kind regars, Jose Carlos

View solution in original post

0 Kudos
57 Views
NXP TechSupport
NXP TechSupport

Hi Jose,

Thanks for the information!


Have a great day,
Kan

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos