2363182_en-US

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

2363182_en-US

2363182_en-US

Migration Guide of NXP-NCI 2.0 SPI examples with PN7160 for MCXW23 in Visual Studio Code

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.

mcxw23 with pn7160.jpg

Best Regards,

Shakir Salam

Development BoardFRDM-TrainingRe: Migration Guide of NXP-NCI 2.0 SPI examples with PN7160 for MCXW23 in Visual Studio Code

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!

Re: Migration Guide of NXP-NCI 2.0 SPI examples with PN7160 for MCXW23 in Visual Studio Code

Hello @S_Salam555.

The option that you have selected is the appropriate for the port.


Re: Migration Guide of NXP-NCI 2.0 SPI examples with PN7160 for MCXW23 in Visual Studio Code

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


spi_config.jpgmcuxpresso.jpg

Re: Migration Guide of NXP-NCI 2.0 SPI examples with PN7160 for MCXW23 in Visual Studio Code

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.

Re: Migration Guide of NXP-NCI 2.0 SPI examples with PN7160 for MCXW23 in Visual Studio Code

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

board_h.jpg

2. hardware_init.c

hardware_init_c.jpg

3. pinmux.c

pinmux_c.jpg

pinmux_c_2.jpg

pinmux_c_3.jpg

4. tml.c

tml_c_1.jpg

tml_c_2.jpg

tml_c_3.jpg

tml_c_4.jpg

5. main.c

main.c.jpg

6. CMakeLists.txt 

cmake_1.jpg

cmake_2.jpg

7. Build Error Output

cmake.jpg

Re: Migration Guide of NXP-NCI 2.0 SPI examples with PN7160 for MCXW23 in Visual Studio Code

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

cmake.txt.jpg

console.jpg

Re: Migration Guide of NXP-NCI 2.0 SPI examples with PN7160 for MCXW23 in Visual Studio Code

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!

Re: Migration Guide of NXP-NCI 2.0 SPI examples with PN7160 for MCXW23 in Visual Studio Code

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

tool_h.jpgproj_dir.jpg

Re: Migration Guide of NXP-NCI 2.0 SPI examples with PN7160 for MCXW23 in Visual Studio Code

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

issue_1.jpg

configFlags.jpg

Re: Migration Guide of NXP-NCI 2.0 SPI examples with PN7160 for MCXW23 in Visual Studio Code

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!

Re: Migration Guide of NXP-NCI 2.0 SPI examples with PN7160 for MCXW23 in Visual Studio Code

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

mcxw23.jpg

mcxw23_code.jpg

Re: Migration Guide of NXP-NCI 2.0 SPI examples with PN7160 for MCXW23 in Visual Studio Code

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?


Re: Migration Guide of NXP-NCI 2.0 SPI examples with PN7160 for MCXW23 in Visual Studio Code

Hi Roman @RomanVR ,

The baud rate matches the tera term, but the issue still persists.

Best Regards,

Shakir Salam


tera_term.jpg

definition.jpg

  

Re: Migration Guide of NXP-NCI 2.0 SPI examples with PN7160 for MCXW23 in Visual Studio Code

Hi Roman @RomanVR ,

This updated on the progress. 

The baud rate matches the tera term, but the issue still persists.

Best Regards,

Shakir Salam 

usart.jpg

spi.jpg

log.jpg

Re: Migration Guide of NXP-NCI 2.0 SPI examples with PN7160 for MCXW23 in Visual Studio Code

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.

pn7160_jumper_1.jpg

pn7160_jumper_2.jpg

code.jpg

terminal_output.jpg


Best Regards,
Shakir Salam

Re: Migration Guide of NXP-NCI 2.0 SPI examples with PN7160 for MCXW23 in Visual Studio Code

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.

Re: Migration Guide of NXP-NCI 2.0 SPI examples with PN7160 for MCXW23 in Visual Studio Code

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


board.jpg

SPI_Definition.jpg

Tera_term_output.jpg

Re: Migration Guide of NXP-NCI 2.0 SPI examples with PN7160 for MCXW23 in Visual Studio Code

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?


タグ(1)
評価なし
バージョン履歴
最終更新日:
‎05-30-2026 05:46 AM
更新者: