PN512 SPI write issue

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

PN512 SPI write issue

跳至解决方案
2,315 次查看
josecarlos
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.

标签 (1)
1 解答
2,161 次查看
josecarlos
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

在原帖中查看解决方案

0 项奖励
回复
3 回复数
2,161 次查看
Kan_Li
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!
-----------------------------------------------------------------------------------------------------------------------

2,162 次查看
josecarlos
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

0 项奖励
回复
2,161 次查看
Kan_Li
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 项奖励
回复