PN7160 (B1) not initializing (SPI)

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

PN7160 (B1) not initializing (SPI)

680 Views
Magnetuz
Contributor I

Hello,

 

I have a PN7160 eval board (OM27160B1HN) that I am using with an ESP32. I adapted the NXP-NCI2.0 LPC55S6x MIRAFE example for the ESP. I also reviewed it according to the UM11495 and I also took a look on the "Migration Guide of NXP-NCI 2.0 SPI examples". However, I cannot properly complete the initialization. After toggling the VEN pin for the hard reset, I send a NCI CORE RESET message, but I get no reply from the PN7160 (the IRQ never triggers after the message). The only alive indication I see from the PN7160 is that when the VEN is low (during the hard reset) the IRQ pin goes high. The MOSI, CLK and NSS signals seem fine as well on the oscilloscope. Voltages on the VDD and VBAT are 3.28V. I configured the SPI for 500kHz.

What could be the issue?

PS.: I attached one oscilloscope image from the CORE RESET message. The signals are: yellow (MOSI), cyan (MISO), purple (NSS) and blue (CLK). At this image I was trying the mode 3 on the SPI config - CPOL 1 (High) and CPHAL 1 (Trailing Edge). I tried all the 4 modes, but none of them worked.

 
 
 
 
 
Labels (1)
0 Kudos
Reply
1 Reply

544 Views
EduardoZamora
NXP TechSupport
NXP TechSupport

Hello @Magnetuz

Hope you are doing well.

My apologies, please consider that implementation and porting to third-party platforms is out of our support scope and must be done entirely by the customer.

According to PN7160, Section 11.2.2.2, CPOL/CPHA are set as follows:

- CPHA = 0: data are sampled on MOSI on the odd clock edges of SCK after NSS goes low.
- CPOL = 0: the clock is idle low and the first valid edge of SCK will be a rising one.

Also, please consider connecting VBAT to 5V.

Regards,
Eduardo.

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2372249%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EPN7160%20(B1)%20not%20initializing%20(SPI)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2372249%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EI%20have%20a%20PN7160%20eval%20board%20(OM27160B1HN)%20that%20I%20am%20using%20with%20an%20ESP32.%26nbsp%3B%3CSPAN%3EI%20adapted%20the%20NXP-NCI2.0%20LPC55S6x%20MIRAFE%20example%20for%20the%20ESP.%20I%20also%20reviewed%20it%20according%20to%20the%20UM11495%20and%20I%20also%20took%20a%20look%20on%20the%20%22%3CSPAN%3EMigration%20Guide%20of%20NXP-NCI%202.0%20SPI%20examples%22%3C%2FSPAN%3E.%20However%2C%20I%20cannot%20properly%20complete%20the%20initialization.%20After%20toggling%20the%20VEN%20pin%20for%20the%20hard%20reset%2C%20I%20send%20a%20NCI%20CORE%20RESET%20message%2C%20but%20I%20get%20no%20reply%20from%20the%20PN7160%20(the%20IRQ%20never%20triggers%20after%20the%20message).%20The%20only%20alive%20indication%20I%20see%20from%20the%20PN7160%20is%20that%20when%20the%20VEN%20is%20low%20(during%20the%20hard%20reset)%20the%20IRQ%20pin%20goes%20high.%20The%20MOSI%2C%20CLK%20and%20NSS%20signals%20seem%20fine%20as%20well%20%3CSPAN%3Eon%20the%20oscilloscope.%20Voltages%20on%20the%20VDD%20and%20VBAT%20are%203.28V%3C%2FSPAN%3E.%20I%20configured%20the%20SPI%20for%20500kHz.%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EWhat%20could%20be%20the%20issue%3F%3C%2FSPAN%3E%3CSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3EPS.%3A%20I%20attached%20one%20oscilloscope%20image%20from%20the%20%3CSPAN%3ECORE%20RESET%20message%3C%2FSPAN%3E.%20The%20signals%20are%3A%20yellow%20(MOSI)%2C%20cyan%20(MISO)%2C%20purple%20(NSS)%20and%20blue%20(CLK).%20At%20this%20image%20I%20was%20trying%20the%20mode%203%20on%20the%20SPI%20config%20-%20CPOL%201%20(High)%20and%20CPHAL%201%20(Trailing%20Edge).%20I%20tried%20all%20the%204%20modes%2C%20but%20none%20of%20them%20worked.%3C%2FSPAN%3E%3C%2FP%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%26nbsp%3B%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%26nbsp%3B%3C%2FDIV%3E%3C%2FDIV%3E%3CDIV%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%26nbsp%3B%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%26nbsp%3B%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%26nbsp%3B%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2372249%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3EEvaluation%20Board%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2374602%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20PN7160%20(B1)%20not%20initializing%20(SPI)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2374602%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%2F263214%22%20target%3D%22_blank%22%3E%40Magnetuz%3C%2FA%3E%3C%2FP%3E%0A%3CP%3EHope%20you%20are%20doing%20well.%3C%2FP%3E%0A%3CP%3EMy%20apologies%2C%20please%20consider%20that%20implementation%20and%20porting%20to%20third-party%20platforms%20is%20out%20of%20our%20support%20scope%20and%20must%20be%20done%20entirely%20by%20the%20customer.%3C%2FP%3E%0A%3CP%3EAccording%20to%20%3CA%20href%3D%22https%3A%2F%2Fwww.nxp.com%2Fdocs%2Fen%2Fdata-sheet%2FPN7160_PN7161.pdf%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EPN7160%3C%2FA%3E%2C%20Section%2011.2.2.2%2C%20CPOL%2FCPHA%20are%20set%20as%20follows%3A%3C%2FP%3E%0A%3CP%3E-%20CPHA%20%3D%200%3A%20data%20are%20sampled%20on%20MOSI%20on%20the%20odd%20clock%20edges%20of%20SCK%20after%20NSS%20goes%20low.%3CBR%20%2F%3E-%20CPOL%20%3D%200%3A%20the%20clock%20is%20idle%20low%20and%20the%20first%20valid%20edge%20of%20SCK%20will%20be%20a%20rising%20one.%3C%2FP%3E%0A%3CP%3EAlso%2C%20please%20consider%20connecting%20VBAT%20to%205V.%3C%2FP%3E%0A%3CP%3ERegards%2C%3CBR%20%2F%3EEduardo.%3C%2FP%3E%3C%2FLINGO-BODY%3E