PN7642 HIF in UART configuration

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

PN7642 HIF in UART configuration

234 Views
KB1
Contributor II

Hello,

Has anyone had any success using the Host Interface (HIF) on the PN7642 Evaluation board via the LPC55s16 Host in UART configuration?

I am able to connect when in SPI mode and the PN7642 bootloader responds as expected.  When I change the ucHost_Utils code to the UART configuration (in 4 places) and change the HostSel switches to the UART mode, I am unable to get the PN7642 bootloader to respond.

Is anyone aware of additional setup required or possibly documentation that specifically describes using HIF in UART configuration?

Any suggestions?

--Keith

 

0 Kudos
Reply
4 Replies

217 Views
EduardoZamora
NXP TechSupport
NXP TechSupport

Hello @KB1

Hope you are doing well.

By any chance, did you add "PHBAL_HIF_SELECT_UART" to the "Defined symbols" (removed it from the undefined symbols) in C/C++ Build > Settings > MCU C Compiler > Preprocessor?

Please consider that an SDK is bound to a certain firmware version. OM27642: Development Kit (which embeds PN7642 C100 variant), comes by default with firmware v01.00. If FW version of PN7642 does not match the FW used by the SDK, some issues and unexpected behaviors can occur.

Additionally, make sure you are using the latest SDK version available (latest Public SDK should be v02.15.004) You can run the check_nxpfw_update demo from PN7642 SDK; if PN7642 and SDK firmware versions do not match, this demo will help you updating the FW.

PN7642 EVK includes several jumpers, multiplexers and level shifters that allow the user to test many possible configurations for the PN7642 IC. As a test, I will recommend you trying to connect the LPC55 to the HIF directly by using J68, as this connection allows you to bypass those devices and connect directly to ATX_x Host Interface pins according to the Schematics for PN76xx RFP-board.

EduardoZamora_0-1758664949758.png

Regards,
Eduardo.

0 Kudos
Reply

179 Views
KB1
Contributor II

Hello Eduardo,

Thank you so much for your prompt and thoughtful reply.  I believe I am conforming to all your suggestions but some of your notes require confirmation...

>> PHBAL_HIF_SELECT_UART" to the "Defined symbols" 

When I select the build configuration - Debug_LPC55s16_PIN_BASED_UART for the four different components in the ucHost_Utils project (Hdll_Lib, SecureDownloadLib, HifEx_Counterpart and DownloadLibEx1), then that symbol is defined and I confirmed that in the Preprocessor build settings.

I am aware of the SDK version and FW link association for the PN7642 but don't see how I am far enough along for that to even matter.  I am running LPC55s16 host code (using that SDK -  SDK_2.x_LPCXpresso55S16, v3.14.0) and don't even have a basic connection via the UART to the PN7642 via the host.

I think the key point here is that I am running with the LPC55s16 host board mounted onto the PN7642 EVK board and I have jumpers in all the J68 positions and I can successfully communicate and download to the PN7642 in SPI mode.  The only changes I have made are the build configuration and the HOSTSEL switches to change to UART mode and it does not work so shouldn't this imply that basic connection is correct?

When I run in both modes, I see the Host is able to reset the PN7642 (red LED flash) but in UART mode, it just hangs when I request firmware version (option 1).

Is there something else that needs to be adjusted to switch modes between SPI and UART?

--Keith

 

0 Kudos
Reply

76 Views
EduardoZamora
NXP TechSupport
NXP TechSupport

Hi,

Besides the direct connections to J68, I could suggest confirming if Port 1 is already init during LPC55S16 Board initialization (i.e. GPIO_PortInit(GPIO, 1) ).

Also, please check if Flexcomm2 is clocked (i.e. CLOCK_AttachClk(kFRO12M_to_FLEXCOMM2) ).

Regards,
Eduardo.

0 Kudos
Reply

52 Views
KB1
Contributor II

Eduardo,

Yes, GPIO Port 1 is initialized.  The code executes as shown below.  However, this is the same for SPI mode (which I previously mentioned works fine) as DWL_REQ and IRQ are needed for that mode as well.

KB1_0-1759875253298.png

The Clock Attach code as you stated is NOT in the code.  "kFRO12M_to_FLEXCOMM2" is not used anywhere.  However there is a clock attach for a Debug UART.  I'm assuming this is NOT the port we would be using to connect to the PN7642 for HIF?

KB1_1-1759875616284.png

 

This is where we get stuck...in fsl_usart.c::USART_ReadBlocking()

KB1_2-1759875778644.png

 

The blocking transmit returns without error and then a read is attempted to retrieve the result and apparently there is nothing in the receive buffer.

 

Can you verify that this code has been tested and it will successfully connect to the PN7642 bootloader in download mode?

 

--Keith

 

 

0 Kudos
Reply