Hi NXP,
First of all, thank you to Roman @RomanVRfor providing the migration guide for frdm-mcxw71 with pn7160:
NXP Community Migration Guide
It would be very helpful if there could also be a guide specifically for using the NXP-NCI driver with Visual Studio Code on the MCXW23 platform. Unfortunately, the MCXW23 currently does not have support in MCUXpresso IDE, so many developers are using Visual Studio Code instead.
A dedicated setup and migration guide for PN7160 SPI integration, driver configuration, SDK setup, and build/debug workflow in Visual Studio Code would greatly help developers working with visual studio code with nxp-nci 2.0 driver.
Best Regards,
Shakir Salam
Hello @S_Salam555, hope you are doing well.
Thank you for your feedback, however there is currently no guide that covers the migration on MCUXpresso for VS Code.
Although, the guide done in MCUXpresso IDE should provide the overall essential steps to do the migration, the only steps that change are the ones that imply file addition and manipulation of your project, which in VS Code should be done via CMake files as stated on the following guide: Add Files to Project/ Remove Files from Project.
Hope this helps!
Hello @S_Salam555.
The option that you have selected is the appropriate for the port.
Hi Roman,
Thank you for the feedback and the information.
Regarding the Manage Component section, could you please advise which option I should choose? This is currently my project structure for reference. No Rush :))
Best regards,
Shakir Salam
Hi @S_Salam555.
Since this is a custom implementation, the support path would be very limited to analyze specific behaviors or issues within your implementation, therefore all of the development would have to be on your own.
Providing a more specific approach to the behavior that you are observing would be very helpful to be able to provide a better support.
Hello Roman,
Hope you’re doing well. Thank you for the suggestion.
How does my CMake configuration look so far?
Below is an overall visual illustration of my project structure for the MCXW23 build.
Best regards,
Shakir Salam
1. Board.h
2. hardware_init.c
3. pinmux.c
4. tml.c
5. main.c
6. CMakeLists.txt
7. Build Error Output
Hi Roman,
Just wanted to share a quick progress update. I’m able to successfully build the project, and now I just need to configure the correct SPI settings.
I’ve attached the latest CMakeLists.txt and the error console log for your reference.
Best regards,
Shakir Salam
Hello @S_Salam555, thank you for the update.
Please notice that the SPI driver name changes between the MCXW71 and MCXW23, while MCXW71 SPI driver APIs are called "LPSPI....", on MCXW23 the APIs and instances are just called "SPI....".
Hope this helps!
Hi Roman,
Sorry I was away a bit on other project, here is the latest screenshot. which i have difficult in compile the #include
Best Regards,
Shakir Salam
Hi Roman,
Currently, the only remaining issue is related to the configuration flags for the MCXW23 to flash. Could you please help verify them for me?
Thanks.
Best regards,
Shakir Salam
Hello @S_Salam555, hope you are doing well.
From the images that you shared from your project, it seems that you are trying to configure SPI with MCXW71 specific configurations which are different from the MCXW23's.
Both drivers need different configuration requirements among them, for this I would suggest that you refer to any polling SPI example from the MCXW23 SDK. I would not suggest to just copy and paste the initializations nor the files from one project to another, rather, adapt the configurations to how your project is built in the TML layer to initialize the SPI peripheral and send and receive data.
Hope this helps!
Hi Roman,
I hope you’re doing well.
I would like to give a quick update on the MCXW23 project. Could you please guide me on how to configure and use SPI and also the board.h on the MCXW23?
Best regards,
Shakir Salam
Hello @S_Salam555.
Those characters commonly appear when there's a mismatch between UART baudrate of the board and the serial terminal. Would you please confirm if you added any API to change the UART baudrate at runtime?
Hi Roman @RomanVR ,
The baud rate matches the tera term, but the issue still persists.
Best Regards,
Shakir Salam
Hi Roman @RomanVR ,
This updated on the progress.
The baud rate matches the tera term, but the issue still persists.
Best Regards,
Shakir Salam
Hello @RomanVR ,
I already changed the connection and avoided using pin 10 on header J2 as suggested. it able to output to tera term. However, the garbled data is still present when connecting the PN7160 EVK.
Please let me know if there are any other pins or configurations that I should verify.
Best Regards,
Shakir Salam
Hello @S_Salam555.
Please consider that if you are using pin 10 of header J2 of the board as one of the GPIOs needed for the communication with the PN7160, since this pin is connected directly to the reset of the MCU, you might be causing the MCU to reset when connecting the NFC EVK, for this you need to use another pin from another header of the board and do the connections with jumpers.
Please let me know if you are using the pin that I mentioned above.
Hi Roman,
Quick Update on the migration. I'm able to flash the firmware. However, when i connect the PN7160 Module. there is no output on Tera Term. When I unplug the module the message "Running the NXP-NCI2.0 example (SPI Interface)" appears, followed by some garbled characters.
Could you please advice on what might be causing this issue?
Thanks
Best Regards,
Shakir Salam
Hello @S_Salam555.
From your shared screenshots I don't see any weird characters being printed. Would you please confirm if, while debugging or having an active debug session, is the application hanging at some point?
Could you please check with a logic analyzer if there is any SPI communication happening?