I've ported the NXPNCI library examples over to a MCXN236 MCUXpresso board and keep getting errors within the NxpNci_CheckDevPres() function. It seems to fail on sending the NCICoreReset data. I've confirmed correct HW connections, but continue to get data failures in 3 different scenarios:
Scenario #1: Using FLEXIO_I2C_MasterTransferBlocking() with no retries, the program hangs in an infinite loop after receiving a shifter error flag from the FLEXIO module (which is interpreted as a NACK).
Scenario #2: Using FLEXIO_I2C_MasterTransferBlocking() with retries (3), the program aborts the write process after receiving a shifter error flag from the FLEXIO module (which is interpreted as a NACK).
Scenario #3: Using FLEXIO_I2C_MasterTransferNonBlocking() with retries (3), the program writes with no error, but fails when attempting to receive an answer back from the PN7160 NFC chip. This results in continuous writes with no returned data.
Per https://www.nxp.com/docs/en/user-manual/UM11496.pdf, I am setting up the pins accordingly and using the default device address 0x28.
I'm currently using the FLEXIO_I2C functions in place of the I2C functions called out in the original TML files for the examples. Since I'm using the pin, clock and peripheral configuration tools, I had to reroute some of the code in the TML files to point to the pin_mux.h/.c and peripheral.h/.c files.
I've attached the project here if anyone has the HW and wants to try. NOTE: because of file size limits, I had to separately compress the debug folder outside of the project folder. To bring up this project, you will either have to decompress the debug folder and place it back into the root folder for the project - OR - create a new debug as MCUXpresso IDE LinkServer.
Pinout from MCXN236 to OM27160 are as follows...
SCL: FLEXIO D21 (J4, Pin 12) ---> J2, Pin 1
SDA: FLEXIO D20 (J4, Pin 10) ---> J2, Pin 2
GND: J4, Pin 3 ---> J1, Pin 6
VDD: 3.3V (J3, Pin ---> J1, Pin 4
VBAT: 5V (J3, Pin 10) ---> J1, Pin 5
IRQ: J7, Pin 4 ---> J1, Pin 10
VEN: J7, Pin 5 ---> J4, Pin 1
DWL_REQ: J6, Pin 6 ---> J4, Pin 2