2026-01-23 2:09 AM - last edited on 2026-01-23 2:22 AM by Andrew Neil
(STM32L476RG+X-NUCLEO-NFC07A)
I use Android ST25 (ST25AndroidApp-V3.12.2) to communicate with NFC7(STM32L476RG) by FTM.
Click FTM demos of Menu ST25DV Demostrations on Android ST25 APP, and click Send data to tag, 1000 bytes by default, the Transmission/Reception success with showd 1000/1000 bytes as showed in image below:
but the show exception "Command failed" from
mDataReceived = mFtmCommands.sendCmdAndWaitForCompletion(...)
of source_ST25AndroidApp-V3.12.2\app\src\main\java\com\st\st25nfc\type5\st25dv\ST25DVFtmDemoActivity.java
the frimware is built by
STMicroelectronics\ST25NFC_Embedded_Lib_ST25R3911B_1.8.0\Projects\STM32L476RG-Nucleo\Applications\X-NUCLEO-NFC07A1\FTM\STM32CubeIDE
and the uart console shows success
After build and run (with ST25FTM_ENABLE_LOG enabled), the uart log as below
----------------------------------------
*****Welcome to x-cube-nfc7 example*****
----------------------------------------
10988: RxState = ST25FTM_RX_INIT_RECEPTION
10992: FtmInfo Field On->Off
10994: FtmInfo Field On
11002: FtmInfo Field Off
11008: FtmInfo Field On
18255: RxState = ST25FTM_RX_READ_PKT
18259: Rx (5)
18260: 4003000000
Reception started (FTM v3.1.2)
18265: RxState = ST25FTM_RX_DONE
Reception completed: 3 bytes in 3 ms
Sending data back
18273: ### ST25FTM_SendStart of 3 bytes
18277: RxState = ST25FTM_RX_IDLE
18280: State = ST25FTM_TX
18282: TxState = ST25FTM_TX_INIT_TRANSMISSION
18286: Starting Segment 0
18289: TxState = ST25FTM_TX_WRITE_SEGMENT
18292: SegmentLen 7
18294: GetCrc 20002d1a 3
18297: PktId 1
18298: PktLen total=9 payload=7
18301: Tx (9) 18302: 7107000000C704DD7B
18305: TxState = ST25FTM_TX_WRITE_PKT
18308: TxState = ST25FTM_TX_WAIT_READ
18349: TxState = ST25FTM_TX_READ_ACK
18424: TxState = ST25FTM_TX_DONE
18427: Rx Ack=0
18429: Ending Segment 0
18431: TxState = ST25FTM_TX_ERROR
Transmission completed: 3 bytes in 161 ms
18438: ### ST25FTM_ReceiveStart for max 8192 bytes
18443: TxState = ST25FTM_TX_IDLE
18446: State = ST25FTM_RX
18448: RxState = ST25FTM_RX_INIT_RECEPTION
20697: RxState = ST25FTM_RX_READ_PKT
20703: Rx (249)
20705: 15000003E8055A5A5A5A5A5A5A5A5A5A...5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A
20711: Starting Segment 0
Reception started (FTM v3.1.2)
20717: GetCrc 20017e81 244
20719: RxState = ST25FTM_RX_INIT_RECEPTION
20796: RxState = ST25FTM_RX_READ_PKT
20802: Rx (249)
20803: 095A5A5A5A5A5A5A5A5A5A5A5A5A5A5A...5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A
20810: GetCrc 20017e7d 248
20813: RxState = ST25FTM_RX_INIT_RECEPTION
20894: RxState = ST25FTM_RX_READ_PKT
20901: Rx (249)
20902: 095A5A5A5A5A5A5A5A5A5A5A5A5A5A5A...5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A
20909: GetCrc 20017e7d 248
20911: RxState = ST25FTM_RX_INIT_RECEPTION
20989: RxState = ST25FTM_RX_READ_PKT
20995: Rx (249)
20997: 095A5A5A5A5A5A5A5A5A5A5A5A5A5A5A...5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A
21004: GetCrc 20017e7d 248
21006: RxState = ST25FTM_RX_INIT_RECEPTION
21010: RxState = ST25FTM_RX_READ_PKT
21014: Rx (18)
21016: 6D105A5A5A5A5A5A5A5A5A5A5A5A6A30F138
21020: GetCrc 20017e7e 12
21022: RxState = ST25FTM_RX_WRITE_ACK
21025: ### Send ACK
21027: RxState = ST25FTM_RX_WAIT_ACK_READ
21031: msgOwner=1
21033: msgOwner=1
21035: msgOwner=1
21036: msgOwner=1
21038: msgOwner=1
21040: msgOwner=1
21041: msgOwner=1
21043: msgOwner=1
21045: msgOwner=1
21046: msgOwner=1
21048: msgOwner=1
21050: msgOwner=1
21052: msgOwner=1
21053: msgOwner=1
21055: msgOwner=1
21057: msgOwner=1
21058: msgOwner=1
21060: msgOwner=1
21062: msgOwner=1
21063: msgOwner=1
21065: msgOwner=1
21067: msgOwner=1
21069: msgOwner=1
21070: msgOwner=1
21072: msgOwner=1
21074: msgOwner=1
21075: msgOwner=1
21077: msgOwner=1
21079: msgOwner=1
21080: msgOwner=1
21082: msgOwner=1
21084: msgOwner=1
21086: msgOwner=1
21087: msgOwner=1
21089: msgOwner=1
21091: msgOwner=1
21092: msgOwner=1
21094: msgOwner=0
21096: Ack is read
21098: RxState = ST25FTM_RX_ACK_READ
21101: lastAck=1
21103: ignoreRetrans=0
21105: Ending Segment 0
21107: receivedLen=1000
21109: validLen=1000
21111: totalvalid=1000
21113: expected=1000
21115: pktPosition=3
21117: FtmRx Ack has been read
21120: RxState = ST25FTM_RX_DONE
Reception completed: 1000 bytes in 406 ms
Sending data back
21129: ### ST25FTM_SendStart of 1000 bytes
21133: RxState = ST25FTM_RX_IDLE
21136: State = ST25FTM_TX
21138: TxState = ST25FTM_TX_INIT_TRANSMISSION
21142: Starting Segment 0
21145: TxState = ST25FTM_TX_WRITE_SEGMENT
21148: SegmentLen 1004
21150: GetCrc 20002d1d 244
21153: PktId 1
21154: PktLen total=249 payload=244
21158: Tx (249) 21159: 15000003E8055A5A5A5A5A5A5A5A5A5A...5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A
21166: TxState = ST25FTM_TX_WRITE_PKT
21172: TxState = ST25FTM_TX_WAIT_READ
21276: TxState = ST25FTM_TX_WRITE_SEGMENT
21280: SegmentLen 1004
21282: GetCrc 20002d19 248
21285: PktId 2
21286: PktLen total=249 payload=248
21289: Tx (249) 21291: 095A5A5A5A5A5A5A5A5A5A5A5A5A5A5A...5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A
21298: TxState = ST25FTM_TX_WRITE_PKT
21304: TxState = ST25FTM_TX_WAIT_READ
21464: TxState = ST25FTM_TX_WRITE_SEGMENT
21468: SegmentLen 1004
21470: GetCrc 20002d19 248
21473: PktId 3
21474: PktLen total=249 payload=248
21477: Tx (249) 21479: 095A5A5A5A5A5A5A5A5A5A5A5A5A5A5A...5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A
21485: TxState = ST25FTM_TX_WRITE_PKT
21510: Warning Mailbox busy, I2C is NACKED: retry later!
21517: TxState = ST25FTM_TX_WAIT_READ
21662: TxState = ST25FTM_TX_WRITE_SEGMENT
21665: SegmentLen 1004
21668: GetCrc 20002d19 248
21670: PktId 4
21672: PktLen total=249 payload=248
21675: Tx (249) 21676: 095A5A5A5A5A5A5A5A5A5A5A5A5A5A5A...5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A5A
21683: TxState = ST25FTM_TX_WRITE_PKT
21689: TxState = ST25FTM_TX_WAIT_READ
21851: TxState = ST25FTM_TX_WRITE_SEGMENT
21855: SegmentLen 1004
21857: GetCrc 20002d1a 12
21859: PktId 5
21861: PktLen total=18 payload=16
21864: Tx (18) 21865: 6D105A5A5A5A5A5A5A5A5A5A5A5A6A30F138
21869: TxState = ST25FTM_TX_WRITE_PKT
21873: TxState = ST25FTM_TX_WAIT_READ
21967: TxState = ST25FTM_TX_READ_ACK
22042: TxState = ST25FTM_TX_DONE
22045: Rx Ack=0
22046: Ending Segment 0
22049: TxState = ST25FTM_TX_ERROR
Transmission completed: 1000 bytes in 923 ms
22056: ### ST25FTM_ReceiveStart for max 8192 bytes
22061: TxState = ST25FTM_TX_IDLE
22064: State = ST25FTM_RX
22066: RxState = ST25FTM_RX_INIT_RECEPTIONI found error "22049: TxState = ST25FTM_TX_ERROR" in side.
How to fixed the issue?
Solved! Go to Solution.
2026-02-17 6:13 AM
Hello
The X-NUCLEO-NFC07A1 is not developped to be in front of the Android demo
Only FW on Discovery board handle Android demo.
This is why Android demo + NFC07 raised the error : The NFC07 just do an echo of data received.
When exchange works, with FW of correct Mother board, here the result: 1000 bytes sent, 2 received
With NFC07 1000 bytes sent and 1000 received....
You have to adapt the FW demo for the demo with the NFC07 with the one provided for the discovery
Hope it clarify
BR,FB
2026-02-17 6:13 AM
Hello
The X-NUCLEO-NFC07A1 is not developped to be in front of the Android demo
Only FW on Discovery board handle Android demo.
This is why Android demo + NFC07 raised the error : The NFC07 just do an echo of data received.
When exchange works, with FW of correct Mother board, here the result: 1000 bytes sent, 2 received
With NFC07 1000 bytes sent and 1000 received....
You have to adapt the FW demo for the demo with the NFC07 with the one provided for the discovery
Hope it clarify
BR,FB