SPI Comm Between FRDM-MCX444 and a PN7160 Module

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SPI Comm Between FRDM-MCX444 and a PN7160 Module

1,415 Views
S_Salam555
Contributor II

I am attempting to establish SPI communication between the FRDM-MCXC444 and a PN7160 module. At the moment, the PN7160 does not respond over SPI. I have verified the basic hardware connections (SPI signals, IRQ, VEN, and RESET), but the device remains unresponsive.

For firmware reference, I am following the NXP PN7160 NFC Reader firmware example originally provided for LPC microcontrollers, and I am in the process of porting and adapting it to the MCXC444 platform. Despite configuring the SPI peripheral according to the PN7160 documentation, communication is not established.

I suspect the issue may be related to:

  • SPI timing or mode configuration differences between LPC and MCXC platforms

  • PN7160 VEN / RESET / IRQ handling sequence

  • Required delays or power-up initialization specific to PN7160

  • Any platform-specific considerations when using PN7160 over SPI

  • Correct configuration and adaptation of the tml.c (Transport Mapping Layer) file, particularly SPI initialization parameters, IRQ handling, and low-level read/write implementation for the MCXC444 platform  

I have attached the project I am currently working on for your reference. Any guidance, recommended configuration changes, or reference material specific to PN7160 with MCX-series MCUs would be greatly appreciated.

0 Kudos
Reply
5 Replies

1,203 Views
S_Salam555
Contributor II

Hi Celeste_Liu,

Here I provided the attach project.

Best Regards,

Shakir Salam

0 Kudos
Reply

1,079 Views
Celeste_Liu
NXP Employee
NXP Employee

Hello @S_Salam555 ,

Thanks for your reply. About PN7160 VEN / RESET / IRQ handling sequence, please refer to PN7160 hardware design guide.

Please note that in order to prevent PM7160 from being in download mode, please ensure that DWL_REQ does not remain at a high level during power-on reset. It is recommended to pull it down or leave it float (with internal pull-down).

Additionally, I don’t quite understand why the SPI frame requires a leading byte of 0x7F.
As far as I know, the SPI interface on the PN7160 is supposed to directly pass through the NCI frame:

For host write operations: the host simply sends the 3‑byte NCI header + payload.
For host read operations: the host “clocks out” data using dummy bytes (typically 0xFF), without needing any dedicated prefix such as a “0x7F write-command header.”

Could you help clarify the purpose of this 0x7F prefix?
Please also let me know if I have misunderstood anything.
In addition, if you could provide a hardware connection diagram between the MCXC444 and the PN7160, that would be even better.

BR

Celeste

 

0 Kudos
Reply

1,024 Views
S_Salam555
Contributor II

Hello Celeste,

Thank you for your clarification and detailed explanation.

Currently, I am working on the FRDM-MCXW71 project rather than the MCXC444 platform. Regarding the 0x7F prefix in the SPI frame, I was experimenting with a dummy leading byte during debugging. Please feel free to disregard this, as it may not be necessary for PN7160 SPI communication.

I will align with the standard NCI frame format as you described and ensure that the DWL_REQ handling follows the recommended configuration to avoid entering download mode.

Please find attached my current project for the FRDM-MCXW71 with PN7160 for your reference.

Thank you again for your guidance.

Best regards,
Shakir Salam 

0 Kudos
Reply

1,018 Views
Celeste_Liu
NXP Employee
NXP Employee

Hello @S_Salam555 

Thank you for updating me on the current progress of your project. However, the MCXW71 is not a general-purpose MCU and falls outside my support scope. I recommend posting a new thread on Wireless MCU - NXP Community, where engineers dedicated to this product can assist you more effectively. Thank you for your understanding.
BR
Celeste
0 Kudos
Reply

1,348 Views
Celeste_Liu
NXP Employee
NXP Employee

Hello @S_Salam555 ,

Sorry that we’ve only just noticed your post, possibly due to a community system issue. Apologies for keeping you waiting.
May I check how things are going with this issue? Do you still need assistance from us?
Also, I wasn’t able to find the attached project you mentioned. Could you please share it again?
Have a nice day.
BR
Celeste
0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2321280%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ESPI%20Comm%20Between%20FRDM-MCX444%20and%20a%20PN7160%20Module%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2321280%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20am%20attempting%20to%20establish%26nbsp%3B%3CSTRONG%3ESPI%20communication%3C%2FSTRONG%3E%26nbsp%3Bbetween%20the%20FRDM-MCXC444%20and%20a%20PN7160%20module.%20At%20the%20moment%2C%20the%20PN7160%20does%20not%20respond%20over%20SPI.%20I%20have%20verified%20the%20basic%20hardware%20connections%20(SPI%20signals%2C%20IRQ%2C%20VEN%2C%20and%20RESET)%2C%20but%20the%20device%20remains%20unresponsive.%3C%2FP%3E%3CP%3EFor%20firmware%20reference%2C%20I%20am%20following%20the%26nbsp%3B%3CSTRONG%3ENXP%20PN7160%20NFC%20Reader%20firmware%20example%20originally%20provided%20for%20LPC%20microcontrollers%3C%2FSTRONG%3E%2C%20and%20I%20am%20in%20the%20process%20of%20porting%20and%20adapting%20it%20to%20the%20MCXC444%20platform.%20Despite%20configuring%20the%20SPI%20peripheral%20according%20to%20the%20PN7160%20documentation%2C%20communication%20is%20not%20established.%3C%2FP%3E%3CP%3EI%20suspect%20the%20issue%20may%20be%20related%20to%3A%3C%2FP%3E%3CUL%3E%3CLI%3E%3CP%3ESPI%20timing%20or%20mode%20configuration%20differences%20between%20LPC%20and%20MCXC%20platforms%3C%2FP%3E%3C%2FLI%3E%3CLI%3E%3CP%3EPN7160%20VEN%20%2F%20RESET%20%2F%20IRQ%20handling%20sequence%3C%2FP%3E%3C%2FLI%3E%3CLI%3E%3CP%3ERequired%20delays%20or%20power-up%20initialization%20specific%20to%20PN7160%3C%2FP%3E%3C%2FLI%3E%3CLI%3E%3CP%3EAny%20platform-specific%20considerations%20when%20using%20PN7160%20over%20SPI%3C%2FP%3E%3C%2FLI%3E%3CLI%3E%3CP%3ECorrect%20configuration%20and%20adaptation%20of%20the%26nbsp%3B%3CSTRONG%3Etml.c%20(Transport%20Mapping%20Layer)%20file%3C%2FSTRONG%3E%2C%20particularly%20SPI%20initialization%20parameters%2C%20IRQ%20handling%2C%20and%20low-level%20read%2Fwrite%20implementation%20for%20the%20MCXC444%20platform%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3C%2FLI%3E%3C%2FUL%3E%3CP%3EI%20have%20attached%20the%20project%20I%20am%20currently%20working%20on%20for%20your%20reference.%20Any%20guidance%2C%20recommended%20configuration%20changes%2C%20or%20reference%20material%20specific%20to%26nbsp%3B%3CSTRONG%3EPN7160%20with%20MCX-series%20MCUs%3C%2FSTRONG%3E%26nbsp%3Bwould%20be%20greatly%20appreciated.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2321280%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3ECommunication%20%26amp%3B%20Control(I3C%20%7C%20I2C%20%7C%20SPI%20%7C%20FlexCAN%20%7C%20Ethernet%20%7C%20FlexIO)%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EDevelopment%20Board%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2326981%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20SPI%20Comm%20Between%20FRDM-MCX444%20and%20a%20PN7160%20Module%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2326981%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F260137%22%20target%3D%22_blank%22%3E%40S_Salam555%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%0A%3CDIV%3ESorry%20that%20we%E2%80%99ve%20only%20just%20noticed%20your%20post%2C%20possibly%20due%20to%20a%20community%20system%20issue.%20Apologies%20for%20keeping%20you%20waiting.%3CBR%20%2F%3EMay%20I%20check%20how%20things%20are%20going%20with%20this%20issue%3F%20Do%20you%20still%20need%20assistance%20from%20us%3F%3CBR%20%2F%3EAlso%2C%20I%20wasn%E2%80%99t%20able%20to%20find%20the%20attached%20project%20you%20mentioned.%20Could%20you%20please%20share%20it%20again%3F%3C%2FDIV%3E%0A%3CDIV%3EHave%20a%20nice%20day.%3C%2FDIV%3E%0A%3CDIV%3EBR%3C%2FDIV%3E%0A%3CDIV%3ECeleste%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2331120%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20SPI%20Comm%20Between%20FRDM-MCX444%20and%20a%20PN7160%20Module%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2331120%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20Celeste_Liu%2C%3C%2FP%3E%3CP%3EHere%20I%20provided%20the%20attach%20project.%3C%2FP%3E%3CP%3EBest%20Regards%2C%3C%2FP%3E%3CP%3EShakir%20Salam%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2336534%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20SPI%20Comm%20Between%20FRDM-MCX444%20and%20a%20PN7160%20Module%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2336534%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F260137%22%20target%3D%22_blank%22%3E%40S_Salam555%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%0A%3CP%3EThanks%20for%20your%20reply.%20About%26nbsp%3BPN7160%20VEN%20%2F%20RESET%20%2F%20IRQ%20handling%20sequence%2C%20please%20refer%20to%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fwww.nxp.com.cn%2Fdocs%2Fen%2Fapplication-note%2FAN12988.pdf%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EPN7160%20hardware%20design%20guide%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3EPlease%20note%20that%20in%20order%20to%20prevent%20PM7160%20from%20being%20in%20download%20mode%2C%20please%20ensure%20that%20DWL_REQ%20does%20not%20remain%20at%20a%20high%20level%20during%20power-on%20reset.%20It%20is%20recommended%20to%20pull%20it%20down%20or%20leave%20it%20float%20(with%20internal%20pull-down).%3C%2FP%3E%0A%3CP%3EAdditionally%2C%20I%20don%E2%80%99t%20quite%20understand%20why%20the%20SPI%20frame%20requires%20a%20leading%20byte%20of%200x7F.%3CBR%20%2F%3EAs%20far%20as%20I%20know%2C%20the%20SPI%20interface%20on%20the%20PN7160%20is%20supposed%20to%20directly%20pass%20through%20the%20NCI%20frame%3A%3C%2FP%3E%0A%3CP%3EFor%20host%20write%20operations%3A%20the%20host%20simply%20sends%20the%203%E2%80%91byte%20NCI%20header%20%2B%20payload.%3CBR%20%2F%3EFor%20host%20read%20operations%3A%20the%20host%20%E2%80%9Cclocks%20out%E2%80%9D%20data%20using%20dummy%20bytes%20(typically%200xFF)%2C%20without%20needing%20any%20dedicated%20prefix%20such%20as%20a%20%E2%80%9C0x7F%20write-command%20header.%E2%80%9D%3C%2FP%3E%0A%3CP%3ECould%20you%20help%20clarify%20the%20purpose%20of%20this%200x7F%20prefix%3F%3CBR%20%2F%3EPlease%20also%20let%20me%20know%20if%20I%20have%20misunderstood%20anything.%3CBR%20%2F%3EIn%20addition%2C%20if%20you%20could%20provide%20a%20hardware%20connection%20diagram%20between%20the%20MCXC444%20and%20the%20PN7160%2C%20that%20would%20be%20even%20better.%3C%2FP%3E%0A%3CP%3EBR%3C%2FP%3E%0A%3CP%3ECeleste%3C%2FP%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2338044%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20SPI%20Comm%20Between%20FRDM-MCX444%20and%20a%20PN7160%20Module%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2338044%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F260137%22%20target%3D%22_blank%22%3E%40S_Salam555%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3EThank%20you%20for%20updating%20me%20on%20the%20current%20progress%20of%20your%20project.%20However%2C%20the%20MCXW71%20is%20not%20a%20general-purpose%20MCU%20and%20falls%20outside%20my%20support%20scope.%20I%20recommend%20posting%20a%20new%20thread%20on%20%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FWireless-MCU%2Fbd-p%2Fwireless-connectivity%22%20target%3D%22_blank%22%3EWireless%20MCU%20-%20NXP%20Community%3C%2FA%3E%2C%20where%20engineers%20dedicated%20to%20this%20product%20can%20assist%20you%20more%20effectively.%20Thank%20you%20for%20your%20understanding.%3C%2FDIV%3E%0A%3CDIV%3EBR%3C%2FDIV%3E%0A%3CDIV%3ECeleste%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2338030%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20SPI%20Comm%20Between%20FRDM-MCX444%20and%20a%20PN7160%20Module%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2338030%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%20Celeste%2C%3C%2FP%3E%3CP%3EThank%20you%20for%20your%20clarification%20and%20detailed%20explanation.%3C%2FP%3E%3CP%3ECurrently%2C%20I%20am%20working%20on%20the%20FRDM-MCXW71%20project%20rather%20than%20the%20MCXC444%20platform.%20Regarding%20the%200x7F%20prefix%20in%20the%20SPI%20frame%2C%20I%20was%20experimenting%20with%20a%20dummy%20leading%20byte%20during%20debugging.%20Please%20feel%20free%20to%20disregard%20this%2C%20as%20it%20may%20not%20be%20necessary%20for%20PN7160%20SPI%20communication.%3C%2FP%3E%3CP%3EI%20will%20align%20with%20the%20standard%20NCI%20frame%20format%20as%20you%20described%20and%20ensure%20that%20the%20DWL_REQ%20handling%20follows%20the%20recommended%20configuration%20to%20avoid%20entering%20download%20mode.%3C%2FP%3E%3CP%3EPlease%20find%20attached%20my%20current%20project%20for%20the%20FRDM-MCXW71%20with%20PN7160%20for%20your%20reference.%3C%2FP%3E%3CP%3EThank%20you%20again%20for%20your%20guidance.%3C%2FP%3E%3CP%3EBest%20regards%2C%3CBR%20%2F%3EShakir%20Salam%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E