Hi all,
I previously had an NFC card reader demo working on a PN7462AU that was being programmed via an LPC-Link2 debug probe. This demo was running from the package SW3683 (in a folder called PN7462AU_ex_phExMain_mcux under the src folder with the name phExMain_15693.c. that I downloaded off of the NXP website for NFC card reading purposes for this specific board. My colleague was the one who had previously set it up for me. I would simply click on the green debug button and it would work - you would be able to bring an NFC tag close to the antenna and it would write to it then print those bytes to the screen.
However, I unplugged the 2 USBs connected to my PC - the LPC-LINK2 and the PN7462AU (which was just receiving power from the PC) and after moving to a different workstation, I replugged it in. I proceeded to click the green debug icon like I did before. However, right when I did this I was greeted with an error I did not understand (see below).
I tried searching up what this failed to execute MI command meant and one response told me that this may have been caused by removing the USB from the PC and causing a debug session to improperly terminate. The solution they proposed was reflashing firmware onto my connected devices. As such, I reflashed the firmware onto LPC-Link2 by running the LPScrypt tool provided by NXP. I believe this worked as the LPC-Linkll was properly identified as a com port on my device. However, when I tried reflashing the firmware on my PN7642AU device by following this tutorial and using the GUI flash tool: https://community.nxp.com/t5/NFC-Knowledge-Base/Program-the-firmware-to-PNEV5180B-board/ta-p/1115153
I was met with the error in this image:
Please note, that I tried to flash several files - not just the default one provided when you press the GUI flash icon but I was presented with the same error regardless.
I don't think this is a software issue I think it is a hardware issue. In fact, I think that if I can properly flash the PN7462AU with the right firmware, I can get this problem fixed. I also downloaded the NFC cockpit software and my PN7462AU device is not being recognized (when I select the dropdown beside open port at the bottom of the application, the dropdown's blank).
Other things I tried doing which may be noteworthy:
- I switched out the USB cables used for both devices. I haven't tried using an external power supply or changing the debug adapter cable yet though I feel this may not yield any changes. This is because, if I unplug the PN7462AU completely from USB power, I'm greeted with a different error which means it is not this USB's fault. If I unplug the debug adapter, I'm greeted with an immediate error that says one of the debug wires was unattached)
- I restarted my PC, restarted the MCUXpresso IDE, unplugged and replugged the USBs of my devices several times into my computer
- I tried setting up MCUXpresso and the development environment from scratch on a separate laptop. I started off by downloading MCUXpresso 11.7.1 on the new PC. I then tried to go to this website: https://mcuxpresso.nxp.com/en/select and select the right development board so I can download the right SDK for the PN7462AU. However, when I tried searching up PN7462AU on this website nothing showed up, so I followed the documentation on the NXP website and installed the SDK for the FRDM-K82F board which I presume is pretty similar (kind of weird though that the board I'm using does not have its own supported SDK). After that, I dragged the zipped SDK folder (that I had just downloaded from the above website) into the "Installed SDKs" tab in MCUXpresso. I then clicked the "Import SDK Examples" button in the bottom left of the screen and I selected hello world under the demo apps dropdown. After clicking finish, a frdmk82f_hello_world folder was created in my project explorer. The build of this folder was successful, but when I tried clicking the green debug icon, it gave me the error that it failed to connect to core:
P.S. If I try using the GUI flash tool that I used on the old PC, on my new setup, I'm presented with a similar error:
I've tried attacking this problem from a lot of angles and have failed and I've scrambled reading documentation for this board and other ones. Any help or guidance would be greatly appreciated.
Thanks so much!
@giraffe508 Thanks for your reply! As a side note, it might have been clear already but I am using the OM27462CDKP evaluation kit. I did a bit of digging and I found this tutorial to let me program the board through the CLI instead of the GUI: https://mcuoneclipse.com/2020/12/05/standalone-and-command-line-programmer-with-mcuxpresso/ I looked into the MCUXpresso manual and I believe the steps outlined in this tutorial and the manual seem to align well. The tutorial told me to preview the command before clicking run on the GUI flash tool, take this command and save it in a .bat file which can then be run via the command prompt on Windows. I tried doing this on both laptops (the one with the existing setup and the other with the new setup I was trying to configure). After doing this, I was met with the same errors. This is the error I found on the new laptop - the one on which I was trying to create a fresh setup:
This is the error I got on the old laptop (the one that was previously running the existing setup):
which practically matches the error I received from the GUI earlier on:
I was wondering if the file I was using could have been the source of the error. I got the firmware of the file from the directory: C:\nxp\NxpNfcCockpit_v7.1.0.0\firmware\PN7462AU\NxpNfcCockpit_05_03_00_Flash.bin. I believe this file came into my computer after downloading the nxp software (which creates an nxp directory on my C drive). However, I did notice that the NFC cockpit's version in v7.1.0.0 while the flash file's version is 5.3.0.0 (from its name). Could this be an issue, I remember reading somewhere that the NFC cockpit and the board need to have the same version so that the Cockpit could recognize the board?
P.S. I tried flashing both the file titled flash and the file titled EEPROM and both presented me with the same errors (I set the base address to 0x00 and set the file type to bin).
Also, unfortunately, I don't have another eval board to test the LPC-Link2 with.
On a separate note, on the new PC I have set up, I can't seem to build the directories contained in the SW3683 package. After importing the project from file system and clicking build on the file I wanted built, I get this message (that there's nothing to build):
The only way I seem to be able to build something is if I go to Import SDK Examples -> select a board (the PN7462AU is not an option so I select the FRDM board - which is where I got the hello world example). But this process doesn't let me build the files from the SW3683 package. How would I go about doing this?
Thanks again!
Hello,
It seems that you are facing issues with programming the PN7462AU using LPC-Link2. Based on the information provided, it appears that the issue might be related to the firmware on the PN7462AU. Let's try to address this step by step.
First, let's make sure that the LPC-Link2 is working correctly. You mentioned that you have already reflashed the firmware on the LPC-Link2 using the LPCScrypt tool. To verify that it is working correctly, you can try connecting it to a different board (if available) and see if you can successfully program and debug that board. This will help us confirm that the LPC-Link2 is not the source of the problem.
Next, let's focus on the PN7462AU. Since you are having issues with flashing the firmware using the GUI flash tool, you can try using the command line flash tool instead. Follow the steps mentioned in the Program the firmware to PNEV5180B board tutorial, but use the command line flash tool instead of the GUI flash tool. Make sure to use the correct firmware file for your PN7462AU board.
Regarding the SDK for the PN7462AU, it is true that there is no specific SDK for this board on the MCUXpresso website. However, you can find the necessary libraries and examples in the SW3683 package that you have already downloaded. You should use the examples from this package instead of the FRDM-K82F SDK examples.
If the above steps do not resolve the issue, there is a possibility that the PN7462AU board might be damaged. In this case, you might need to consider getting a replacement board.
I hope this helps you in resolving the issue. If you have any further questions or need more assistance, please feel free to ask.