PN7161 issue with SPI

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

PN7161 issue with SPI

56 次查看
techteam
Contributor I

We are using the PN7161 (PN7161B1HN/C100) NFC controller with an ESP32 and have followed the hardware design reference from AN12988 (PN7160 hardware design guide).

We are facing an issue where, during SPI communication, the MISO line remains constantly high, and we always receive 0xFF. We have attempted using external pull-ups and pull-downs on the MISO line, but the issue persists.

Additionally, we tried communicating over I2C using both addresses (0x28 and 0x50), but we were unable to establish a connection.

Could you please assist us in diagnosing and resolving this issue? Any guidance or recommendations would be greatly appreciated.

0 项奖励
回复
1 回复

30 次查看
Daniel_Gutierrez
NXP Employee
NXP Employee

Hello @techteam, Good Day!

Thank you very much for your interest in our products.

Please consider that for the PN7161B1HN/C100 variant of the chip, the host interface is fixed to SPI during production of the device and cannot be changed. For addressing host communication issues, please make sure a correct power-up sequence of the device is taking place, please have a look at section 11.5 of the PN7160_PN7161 Data Sheet for reference on possible power-up sequences for a successful host communication.

For communicating via SPI with the chip please make sure the following pins are being handled correctly:

  • HIF1 NSS (Not Target Select)
  • HIF2 MOSI (Controller Out Target In)
  • HIF3 MISO (Controller In Target Out)
  • HIF4 SCK (Serial Clock)

And ensure the SPI communication sequence is properly met. Consider the following:

  • PN7161 starts sampling when receiving a logic low at pin NSS and the clock at input pin SCK.
  • SCK must be provided by the host.
  • The MISO line is configured as an input in a controller device.
  • The MOSI line is configured as an output in a controller device.
  • MSB is sent first.
  • 7 MHz maximum SPI frequency.

 

Please take a look at Table 15 of the same document for details on EEPROM settings to be done for SPI-bus configuration. I would recommend as well checking out section 15.2.6 for a detailed description on the SPI-bus timings that have to be considered for proper communication.

 

Additionally, it would be of great help if you could please share the SPI frame (by using an oscilloscope or logic analyzer) that you get when reading the MISO, MOSI, NSS and SCK pins while running the program used for communicating with the PN7161.

 

My best regards,
Daniel.

0 项奖励
回复