cancel
Showing results for 
Search instead for 
Did you mean: 

NFC DFU Unable to Upgrade When BIN Size is More Than 400KB

RahulBaraiya
Associate II

 

Hello Developers,

In my product solution based on the STM32L496VGTX, I am currently adding NFC DFU functionality. Using the FTM Demo Feature in the ST25 NFC Tap App, we were successfully able to update and store firmware packets using the mailbox of the ST25DV04KC module.

Issue Description:

I am encountering an issue when attempting to upgrade with a BIN file of 409,984 bytes (410KB). Specifically, the issue occurs when the file size reaches 405,982 bytes; at this point, the update process fails with a timeout. However, when I use a 399,360 bytes (390KB) BIN file, the update process works successfully every time without any issues.

Steps Taken:

  1. Tested different file sizes: The 390KB files work perfectly, but the 410KB files consistently cause a timeout during the NFC DFU process, specifically at 405,982 bytes.
  2. Tried increasing buffer sizes: I increased the buffer size from 6000 to 15000, but the issue persists.
  3. Checked NFC connection and signal strength: No issues were detected with the NFC hardware or communication.
  4. Adjusted timeout values: I increased the timeouts, but the packet reception still times out when the file size reaches 405,982 bytes.

Request for Assistance:

Has anyone encountered a similar issue where BIN file sizes larger than 400KB cause NFC DFU packet reception timeouts, specifically around the 405,982 bytes mark? Could this issue be related to memory handling or packet fragmentation when handling larger file sizes, particularly when using the FTM DMO feature in the ST25 NFC Tap App?

I have also attached the log output for further reference.

Any guidance or suggestions for troubleshooting would be greatly appreciated.

Thank you!

[12:32:53:189] pkt.totalLength - 0x0␍␊
[12:32:53:189] pkt.ctrl.byte - 0x19␍␊
[12:32:53:189] pkt.crc - 0x0␍␊
[12:32:53:189] pkt.has_crc - 0x0␍␊
[12:32:53:194] Starting Segment 82␍␊
[12:32:53:194] FtmRxWarning2 Segment restarted, retryLength=52083␍␊
[12:32:53:199] segmentLength=248␍␊
[12:32:53:206] receivedLength=725␍␊
[12:32:53:206] totalValidReceivedLength=405982␍␊
[12:33:02:047] pkt.length - 0xf8␍␊
[12:33:02:051] pkt.totalLength - 0x0␍␊
[12:33:02:051] pkt.ctrl.byte - 0x19␍␊
[12:33:02:057] pkt.crc - 0x0␍␊
[12:33:02:057] pkt.has_crc - 0x0␍␊
[12:33:02:057] Starting Segment 82␍␊
[12:33:02:057] FtmRxWarning2 Segment restarted, retryLength=60019␍␊
[12:33:02:063] segmentLength=3720␍␊
[12:33:02:063] receivedLength=4197␍␊
[12:33:02:069] totalValidReceivedLength=405982␍␊
[12:33:21:976] NFC DFU packet reception timeout.␍␊
[12:33:22:148] State = FTM_READ␍␊

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hello Rahul,

looking at your traces it seems indeed you are using quite an old version of FTM driver.

The first comment is I would recommend you to update the FTM driver being used to the latest version.

The STSW-ST25DV002 package on st.com has been updated in the past months with many enhancements and bug fixes. I warmly recommend you to have a look to this new package and to port it on your product.

The packages contain a file (...\Middlewares\ST\ST25FTM\Docs\PortingFTM.txt) listing main actions to port the old FTM in your application to the new version.

Moreover, you can find some few documentation on st.com related to the FTM:
- AN5512: details the FTM component APIs
- UM2949: details the FTM protocol
- UM3078: details the use of FTM component on Linux

 

The second comment is related to your Binary Size test.

AFAIU, with another bigger binary file (and even with a smaller file) the FW upgrade is passing. It seems the problem is in some way linked to the FW being uploaded.

Could you please check if this segment #82 is supposed to be the last segment to be sent in such case this could explain the communication is failing due to an error in final segment sending format. Indeed, it appears in your traces the pkt.ctrl.byte is not correct with the last packet of segment #82 thus the multiple retries: it should be set to 0x69 (with b4b5 meaning LAST_PKT) whereas here it is set to 0x19 (with b4b5 meaning FIRST_PKT), there is a consistency issue here:

[15:57:06:423] Ending Segment 81␍␊
[15:57:06:424] receivedLen=5085␍␊
[15:57:06:427] validLen=4951␍␊
[15:57:06:428] totalvalid=405982␍␊
[15:57:06:430] FtmRx Continue reception␍␊
[15:57:06:506] RxState = FTM_READ_CMD␍␊
[15:57:06:508] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:57:06:636] pkt.length - 0xf8␍␊
[15:57:06:638] pkt.totalLength - 0x0␍␊
[15:57:06:639] pkt.ctrl.byte - 0x19␍␊    <<<< normal value as it is first packet of segment #82
[15:57:06:642] pkt.crc - 0x0␍␊
[15:57:06:644] pkt.has_crc - 0x0␍␊
[15:57:06:644] Starting Segment 82␍␊

...

[15:57:10:655] pkt.length - 0xf8␍␊
[15:57:10:657] pkt.totalLength - 0x0␍␊
[15:57:10:659] pkt.ctrl.byte - 0x19␍␊    <<<< Should be 0x69 here !!
[15:57:10:661] pkt.crc - 0x0␍␊
[15:57:10:662] pkt.has_crc - 0x0␍␊
[15:57:10:664] Starting Segment 82␍␊
[15:57:10:666] FtmRxWarning2 Segment restarted, retryLength=8186␍␊

...

[15:57:14:689] pkt.length - 0xf8␍␊
[15:57:14:691] pkt.totalLength - 0x0␍␊
[15:57:14:694] pkt.ctrl.byte - 0x19␍␊      <<<< Should be 0x69 here !!
[15:57:14:695] pkt.crc - 0x0␍␊
[15:57:14:697] pkt.has_crc - 0x0␍␊
[15:57:14:698] Starting Segment 82␍␊
[15:57:14:700] FtmRxWarning2 Segment restarted, retryLength=11906␍␊

...

 

So two recommendations here:

  • do the porting to the latest FTM version
  • check the reason the pkt.ctrl.byte is not correct (0x19 instead of 0x69) with the last packet of (last?) segment

 

best regards,
Cedric.

View solution in original post

4 REPLIES 4
Cedric Dalban
ST Employee

Hello Rahul,

looking at your traces some few things appear:

  • the segment transmission is stuck on segment #82
  • the totalValidReceivedLength is indeed stuck to 405982 bytes

at first sight your FW is not able to process and/or store this segment #82, rewinds the received data and keeps on retrying to receive this segment.

In order to investigate a bit further, as it seems you reduced the traces, could you please provide the full set of traces (from which you would have of course removed the transmitted bytes in order not to share your own FW ;-)) with at least the full traces from where starts the retry on segment ?

That would also be useful to get the traces uncommented in ST25FTM_Unpack(), this will provide the Ctrl bits currently being handled.

By default in our demo, the allocated size on STM32L4 for FW upload is around 120KB, do you confirm the NVM size allocated to your FW download is big enough to received these 400+KB ?

Another question, could you please check the callbacks related to the events EVENT_FTM_RX_NEW_SEGMENT and EVENT_FTM_RX_DONE are duly process the received data so that not retransmission is requested ?

 

BR,

Cedric.

 

Hello Cedric,

Thank you for the detailed analysis. Here are my responses to each of your points:

  1. Trace Information: I’ll collect and provide the full set of traces, excluding the actual transmitted firmware bytes, as requested. I'll ensure the traces cover the point where the retries on segment #82 begin.

  2. NVM Size Confirmation: Yes, the allocated NVM size for firmware upload on the STM32L4 is set to accommodate the 400+ KB of firmware data, so it should be large enough for this file.

  3. Callback Processing: I've reviewed the code, and it seems that the EVENT_FTM_RX_NEW_SEGMENT  and EVENT_FTM_RX_DONE callback is not implemented in the current version(1.0.0).  

 

2] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:56:55:612] lastAck=1␍␊
[15:56:55:613] ignoreRetrans=0␍␊
[15:56:55:616] Ending Segment 79␍␊
[15:56:55:617] receivedLen=5423␍␊
[15:56:55:618] validLen=4951␍␊
[15:56:55:620] totalvalid=396080␍␊
[15:56:55:621] FtmRx Continue reception␍␊
[15:56:55:708] RxState = FTM_READ_CMD␍␊
[15:56:55:830] pkt.length - 0xf8␍␊
[15:56:55:831] pkt.totalLength - 0x0␍␊
[15:56:55:833] pkt.ctrl.byte - 0x19␍␊
[15:56:55:836] pkt.crc - 0x0␍␊
[15:56:55:837] pkt.has_crc - 0x0␍␊
[15:56:55:839] Starting Segment 80␍␊
[15:56:55:973] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:56:56:100] pkt.length - 0xf8␍␊
[15:56:56:102] pkt.totalLength - 0x0␍␊
[15:56:56:104] pkt.ctrl.byte - 0x9␍␊
[15:56:56:106] pkt.crc - 0x0␍␊
[15:56:56:108] pkt.has_crc - 0x0␍␊
[15:56:56:239] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:56:56:366] pkt.length - 0xf8␍␊
[15:56:56:368] pkt.totalLength - 0x0␍␊
[15:56:56:370] pkt.ctrl.byte - 0x9␍␊
[15:56:56:372] pkt.crc - 0x0␍␊
[15:56:56:373] pkt.has_crc - 0x0␍␊
[15:56:56:512] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:56:56:639] pkt.length - 0xf8␍␊
[15:56:56:640] pkt.totalLength - 0x0␍␊
[15:56:56:642] pkt.ctrl.byte - 0x9␍␊
[15:56:56:644] pkt.crc - 0x0␍␊
[15:56:56:646] pkt.has_crc - 0x0␍␊
[15:56:56:785] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:56:56:911] pkt.length - 0xf8␍␊
[15:56:56:913] pkt.totalLength - 0x0␍␊
[15:56:56:915] pkt.ctrl.byte - 0x9␍␊
[15:56:56:917] pkt.crc - 0x0␍␊
[15:56:56:919] pkt.has_crc - 0x0␍␊
[15:56:57:052] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:56:57:180] pkt.length - 0xf8␍␊
[15:56:57:181] pkt.totalLength - 0x0␍␊
[15:56:57:183] pkt.ctrl.byte - 0x9␍␊
[15:56:57:185] pkt.crc - 0x0␍␊
[15:56:57:187] pkt.has_crc - 0x0␍␊
[15:56:57:340] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:56:57:467] pkt.length - 0xf8␍␊
[15:56:57:469] pkt.totalLength - 0x0␍␊
[15:56:57:471] pkt.ctrl.byte - 0x9␍␊
[15:56:57:473] pkt.crc - 0x0␍␊
[15:56:57:474] pkt.has_crc - 0x0␍␊
[15:56:57:612] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:56:57:739] pkt.length - 0xf8␍␊
[15:56:57:741] pkt.totalLength - 0x0␍␊
[15:56:57:743] pkt.ctrl.byte - 0x9␍␊
[15:56:57:745] pkt.crc - 0x0␍␊
[15:56:57:746] pkt.has_crc - 0x0␍␊
[15:56:57:883] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:56:58:010] pkt.length - 0xf8␍␊
[15:56:58:012] pkt.totalLength - 0x0␍␊
[15:56:58:014] pkt.ctrl.byte - 0x9␍␊
[15:56:58:016] pkt.crc - 0x0␍␊
[15:56:58:017] pkt.has_crc - 0x0␍␊
[15:56:58:152] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:56:58:279] pkt.length - 0xf8␍␊
[15:56:58:281] pkt.totalLength - 0x0␍␊
[15:56:58:283] pkt.ctrl.byte - 0x9␍␊
[15:56:58:285] pkt.crc - 0x0␍␊
[15:56:58:287] pkt.has_crc - 0x0␍␊
[15:56:58:420] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:56:58:548] pkt.length - 0xf8␍␊
[15:56:58:549] pkt.totalLength - 0x0␍␊
[15:56:58:551] pkt.ctrl.byte - 0x9␍␊
[15:56:58:553] pkt.crc - 0x0␍␊
[15:56:58:555] pkt.has_crc - 0x0␍␊
[15:56:58:691] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:56:58:818] pkt.length - 0xf8␍␊
[15:56:58:820] pkt.totalLength - 0x0␍␊
[15:56:58:823] pkt.ctrl.byte - 0x9␍␊
[15:56:58:824] pkt.crc - 0x0␍␊
[15:56:58:826] pkt.has_crc - 0x0␍␊
[15:56:58:965] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:56:59:092] pkt.length - 0xf8␍␊
[15:56:59:093] pkt.totalLength - 0x0␍␊
[15:56:59:096] pkt.ctrl.byte - 0x9␍␊
[15:56:59:098] pkt.crc - 0x0␍␊
[15:56:59:100] pkt.has_crc - 0x0␍␊
[15:56:59:234] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:56:59:361] pkt.length - 0xf8␍␊
[15:56:59:363] pkt.totalLength - 0x0␍␊
[15:56:59:365] pkt.ctrl.byte - 0x9␍␊
[15:56:59:367] pkt.crc - 0x0␍␊
[15:56:59:369] pkt.has_crc - 0x0␍␊
[15:56:59:502] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:56:59:629] pkt.length - 0xf8␍␊
[15:56:59:631] pkt.totalLength - 0x0␍␊
[15:56:59:634] pkt.ctrl.byte - 0x9␍␊
[15:56:59:635] pkt.crc - 0x0␍␊
[15:56:59:636] pkt.has_crc - 0x0␍␊
[15:56:59:774] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:56:59:902] pkt.length - 0xf8␍␊
[15:56:59:903] pkt.totalLength - 0x0␍␊
[15:56:59:905] pkt.ctrl.byte - 0x9␍␊
[15:56:59:907] pkt.crc - 0x0␍␊
[15:56:59:908] pkt.has_crc - 0x0␍␊
[15:57:00:043] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:57:00:170] pkt.length - 0xf8␍␊
[15:57:00:172] pkt.totalLength - 0x0␍␊
[15:57:00:174] pkt.ctrl.byte - 0x9␍␊
[15:57:00:176] pkt.crc - 0x0␍␊
[15:57:00:177] pkt.has_crc - 0x0␍␊
[15:57:00:315] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:57:00:441] pkt.length - 0xf8␍␊
[15:57:00:443] pkt.totalLength - 0x0␍␊
[15:57:00:445] pkt.ctrl.byte - 0x9␍␊
[15:57:00:447] pkt.crc - 0x0␍␊
[15:57:00:449] pkt.has_crc - 0x0␍␊
[15:57:00:582] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:57:00:710] pkt.length - 0xf8␍␊
[15:57:00:711] pkt.totalLength - 0x0␍␊
[15:57:00:713] pkt.ctrl.byte - 0x9␍␊
[15:57:00:715] pkt.crc - 0x0␍␊
[15:57:00:716] pkt.has_crc - 0x0␍␊
[15:57:00:846] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:57:00:972] pkt.length - 0xef␍␊
[15:57:00:974] pkt.totalLength - 0x0␍␊
[15:57:00:975] pkt.ctrl.byte - 0x69␍␊
[15:57:00:977] pkt.crc - 0x0␍␊
[15:57:00:978] pkt.has_crc - 0x0␍␊
[15:57:00:980] segment_crc  : 0xd83c92ac␍␊
[15:57:00:983] computed_crc : 0xd83c92ac␍␊
[15:57:00:985] FtmRx TxAck␍␊
[15:57:00:987] Rx ACK msg length: 1␍␊
[15:57:00:989] Rx ACK msg data: 128␍␊
[15:57:00:992] RxState = FTM_READ_WRITE_ACK␍␊
[15:57:00:994] FtmRx TxAck␍␊
[15:57:00:997] Rx ACK msg length: 1␍␊
[15:57:00:999] Rx ACK msg data: 128␍␊
[15:57:01:000] FtmRx TxAck␍␊
[15:57:01:006] Rx ACK msg length: 1␍␊
[15:57:01:008] Rx ACK msg data: 128␍␊
[15:57:01:011] RxState = FTM_READ_WAIT_ACK_READ␍␊
[15:57:01:018] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:57:01:029] lastAck=1␍␊
[15:57:01:029] ignoreRetrans=0␍␊
[15:57:01:031] Ending Segment 80␍␊
[15:57:01:033] receivedLen=5254␍␊
[15:57:01:034] validLen=4951␍␊
[15:57:01:037] totalvalid=401031␍␊
[15:57:01:037] FtmRx Continue reception␍␊
[15:57:01:122] RxState = FTM_READ_CMD␍␊
[15:57:01:246] pkt.length - 0xf8␍␊
[15:57:01:246] pkt.totalLength - 0x0␍␊
[15:57:01:249] pkt.ctrl.byte - 0x1b␍␊
[15:57:01:251] pkt.crc - 0x0␍␊
[15:57:01:252] pkt.has_crc - 0x0␍␊
[15:57:01:254] Starting Segment 81␍␊
[15:57:01:396] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:57:01:523] pkt.length - 0xf8␍␊
[15:57:01:526] pkt.totalLength - 0x0␍␊
[15:57:01:527] pkt.ctrl.byte - 0xb␍␊
[15:57:01:529] pkt.crc - 0x0␍␊
[15:57:01:531] pkt.has_crc - 0x0␍␊
[15:57:01:677] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:57:01:804] pkt.length - 0xf8␍␊
[15:57:01:806] pkt.totalLength - 0x0␍␊
[15:57:01:808] pkt.ctrl.byte - 0xb␍␊
[15:57:01:810] pkt.crc - 0x0␍␊
[15:57:01:811] pkt.has_crc - 0x0␍␊
[15:57:01:946] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:57:02:072] pkt.length - 0xf8␍␊
[15:57:02:075] pkt.totalLength - 0x0␍␊
[15:57:02:076] pkt.ctrl.byte - 0xb␍␊
[15:57:02:078] pkt.crc - 0x0␍␊
[15:57:02:079] pkt.has_crc - 0x0␍␊
[15:57:02:211] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:57:02:338] pkt.length - 0xf8␍␊
[15:57:02:339] pkt.totalLength - 0x0␍␊
[15:57:02:341] pkt.ctrl.byte - 0xb␍␊
[15:57:02:343] pkt.crc - 0x0␍␊
[15:57:02:345] pkt.has_crc - 0x0␍␊
[15:57:02:476] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:57:02:603] pkt.length - 0xf8␍␊
[15:57:02:605] pkt.totalLength - 0x0␍␊
[15:57:02:607] pkt.ctrl.byte - 0xb␍␊
[15:57:02:610] pkt.crc - 0x0␍␊
[15:57:02:610] pkt.has_crc - 0x0␍␊
[15:57:02:743] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:57:02:869] pkt.length - 0xf8␍␊
[15:57:02:871] pkt.totalLength - 0x0␍␊
[15:57:02:873] pkt.ctrl.byte - 0xb␍␊
[15:57:02:875] pkt.crc - 0x0␍␊
[15:57:02:877] pkt.has_crc - 0x0␍␊
[15:57:03:014] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:57:03:141] pkt.length - 0xf8␍␊
[15:57:03:143] pkt.totalLength - 0x0␍␊
[15:57:03:144] pkt.ctrl.byte - 0xb␍␊
[15:57:03:147] pkt.crc - 0x0␍␊
[15:57:03:148] pkt.has_crc - 0x0␍␊
[15:57:03:281] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:57:03:408] pkt.length - 0xf8␍␊
[15:57:03:410] pkt.totalLength - 0x0␍␊
[15:57:03:412] pkt.ctrl.byte - 0xb␍␊
[15:57:03:414] pkt.crc - 0x0␍␊
[15:57:03:416] pkt.has_crc - 0x0␍␊
[15:57:03:547] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:57:03:675] pkt.length - 0xf8␍␊
[15:57:03:677] pkt.totalLength - 0x0␍␊
[15:57:03:678] pkt.ctrl.byte - 0xb␍␊
[15:57:03:681] pkt.crc - 0x0␍␊
[15:57:03:682] pkt.has_crc - 0x0␍␊
[15:57:03:819] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:57:03:947] pkt.length - 0xf8␍␊
[15:57:03:949] pkt.totalLength - 0x0␍␊
[15:57:03:950] pkt.ctrl.byte - 0xb␍␊
[15:57:03:953] pkt.crc - 0x0␍␊
[15:57:03:954] pkt.has_crc - 0x0␍␊
[15:57:04:091] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:57:04:217] pkt.length - 0xf8␍␊
[15:57:04:219] pkt.totalLength - 0x0␍␊
[15:57:04:221] pkt.ctrl.byte - 0xb␍␊
[15:57:04:223] pkt.crc - 0x0␍␊
[15:57:04:224] pkt.has_crc - 0x0␍␊
[15:57:04:361] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:57:04:487] pkt.length - 0xf8␍␊
[15:57:04:488] pkt.totalLength - 0x0␍␊
[15:57:04:490] pkt.ctrl.byte - 0xb␍␊
[15:57:04:492] pkt.crc - 0x0␍␊
[15:57:04:495] pkt.has_crc - 0x0␍␊
[15:57:04:634] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:57:04:762] pkt.length - 0xf8␍␊
[15:57:04:763] pkt.totalLength - 0x0␍␊
[15:57:04:766] pkt.ctrl.byte - 0xb␍␊
[15:57:04:767] pkt.crc - 0x0␍␊
[15:57:04:769] pkt.has_crc - 0x0␍␊
[15:57:04:901] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:57:05:027] pkt.length - 0xf8␍␊
[15:57:05:029] pkt.totalLength - 0x0␍␊
[15:57:05:031] pkt.ctrl.byte - 0xb␍␊
[15:57:05:033] pkt.crc - 0x0␍␊
[15:57:05:034] pkt.has_crc - 0x0␍␊
[15:57:05:174] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:57:05:300] pkt.length - 0xf8␍␊
[15:57:05:302] pkt.totalLength - 0x0␍␊
[15:57:05:304] pkt.ctrl.byte - 0xb␍␊
[15:57:05:306] pkt.crc - 0x0␍␊
[15:57:05:307] pkt.has_crc - 0x0␍␊
[15:57:05:441] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:57:05:567] pkt.length - 0xf8␍␊
[15:57:05:569] pkt.totalLength - 0x0␍␊
[15:57:05:571] pkt.ctrl.byte - 0xb␍␊
[15:57:05:574] pkt.crc - 0x0␍␊
[15:57:05:575] pkt.has_crc - 0x0␍␊
[15:57:05:707] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:57:05:834] pkt.length - 0xf8␍␊
[15:57:05:835] pkt.totalLength - 0x0␍␊
[15:57:05:837] pkt.ctrl.byte - 0xb␍␊
[15:57:05:839] pkt.crc - 0x0␍␊
[15:57:05:840] pkt.has_crc - 0x0␍␊
[15:57:05:973] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:57:06:099] pkt.length - 0xf8␍␊
[15:57:06:101] pkt.totalLength - 0x0␍␊
[15:57:06:103] pkt.ctrl.byte - 0xb␍␊
[15:57:06:106] pkt.crc - 0x0␍␊
[15:57:06:106] pkt.has_crc - 0x0␍␊
[15:57:06:237] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:57:06:362] pkt.length - 0xef␍␊
[15:57:06:364] pkt.totalLength - 0x0␍␊
[15:57:06:366] pkt.ctrl.byte - 0x6b␍␊
[15:57:06:367] pkt.crc - 0x0␍␊
[15:57:06:368] pkt.has_crc - 0x0␍␊
[15:57:06:370] segment_crc  : 0x86572a5c␍␊
[15:57:06:374] computed_crc : 0x86572a5c␍␊
[15:57:06:375] FtmRx TxAck␍␊
[15:57:06:378] Rx ACK msg length: 1␍␊
[15:57:06:380] Rx ACK msg data: 128␍␊
[15:57:06:382] RxState = FTM_READ_WRITE_ACK␍␊
[15:57:06:385] FtmRx TxAck␍␊
[15:57:06:391] Rx ACK msg length: 1␍␊
[15:57:06:392] Rx ACK msg data: 128␍␊
[15:57:06:395] RxState = FTM_READ_WAIT_ACK_READ␍␊
[15:57:06:410] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:57:06:421] lastAck=1␍␊
[15:57:06:422] ignoreRetrans=0␍␊
[15:57:06:423] Ending Segment 81␍␊
[15:57:06:424] receivedLen=5085␍␊
[15:57:06:427] validLen=4951␍␊
[15:57:06:428] totalvalid=405982␍␊
[15:57:06:430] FtmRx Continue reception␍␊
[15:57:06:506] RxState = FTM_READ_CMD␍␊
[15:57:06:508] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:57:06:636] pkt.length - 0xf8␍␊
[15:57:06:638] pkt.totalLength - 0x0␍␊
[15:57:06:639] pkt.ctrl.byte - 0x19␍␊
[15:57:06:642] pkt.crc - 0x0␍␊
[15:57:06:644] pkt.has_crc - 0x0␍␊
[15:57:06:644] Starting Segment 82␍␊
[15:57:06:779] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:57:06:906] pkt.length - 0xf8␍␊
[15:57:06:908] pkt.totalLength - 0x0␍␊
[15:57:06:909] pkt.ctrl.byte - 0x9␍␊
[15:57:06:912] pkt.crc - 0x0␍␊
[15:57:06:913] pkt.has_crc - 0x0␍␊
[15:57:07:048] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:57:07:175] pkt.length - 0xf8␍␊
[15:57:07:178] pkt.totalLength - 0x0␍␊
[15:57:07:180] pkt.ctrl.byte - 0x9␍␊
[15:57:07:182] pkt.crc - 0x0␍␊
[15:57:07:183] pkt.has_crc - 0x0␍␊
[15:57:07:320] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:57:07:447] pkt.length - 0xf8␍␊
[15:57:07:448] pkt.totalLength - 0x0␍␊
[15:57:07:451] pkt.ctrl.byte - 0x9␍␊
[15:57:07:452] pkt.crc - 0x0␍␊
[15:57:07:454] pkt.has_crc - 0x0␍␊
[15:57:07:591] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:57:07:718] pkt.length - 0xf8␍␊
[15:57:07:719] pkt.totalLength - 0x0␍␊
[15:57:07:721] pkt.ctrl.byte - 0x9␍␊
[15:57:07:722] pkt.crc - 0x0␍␊
[15:57:07:725] pkt.has_crc - 0x0␍␊
[15:57:07:861] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:57:07:988] pkt.length - 0xf8␍␊
[15:57:07:989] pkt.totalLength - 0x0␍␊
[15:57:07:992] pkt.ctrl.byte - 0x9␍␊
[15:57:07:994] pkt.crc - 0x0␍␊
[15:57:07:995] pkt.has_crc - 0x0␍␊
[15:57:08:129] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:57:08:256] pkt.length - 0xf8␍␊
[15:57:08:258] pkt.totalLength - 0x0␍␊
[15:57:08:260] pkt.ctrl.byte - 0x9␍␊
[15:57:08:262] pkt.crc - 0x0␍␊
[15:57:08:263] pkt.has_crc - 0x0␍␊
[15:57:08:397] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:57:08:524] pkt.length - 0xf8␍␊
[15:57:08:526] pkt.totalLength - 0x0␍␊
[15:57:08:528] pkt.ctrl.byte - 0x9␍␊
[15:57:08:530] pkt.crc - 0x0␍␊
[15:57:08:531] pkt.has_crc - 0x0␍␊
[15:57:08:663] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:57:08:790] pkt.length - 0xf8␍␊
[15:57:08:792] pkt.totalLength - 0x0␍␊
[15:57:08:793] pkt.ctrl.byte - 0x9␍␊
[15:57:08:796] pkt.crc - 0x0␍␊
[15:57:08:797] pkt.has_crc - 0x0␍␊
[15:57:08:929] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:57:09:056] pkt.length - 0xf8␍␊
[15:57:09:058] pkt.totalLength - 0x0␍␊
[15:57:09:060] pkt.ctrl.byte - 0x9␍␊
[15:57:09:061] pkt.crc - 0x0␍␊
[15:57:09:063] pkt.has_crc - 0x0␍␊
[15:57:09:195] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:57:09:321] pkt.length - 0xf8␍␊
[15:57:09:323] pkt.totalLength - 0x0␍␊
[15:57:09:325] pkt.ctrl.byte - 0x9␍␊
[15:57:09:327] pkt.crc - 0x0␍␊
[15:57:09:329] pkt.has_crc - 0x0␍␊
[15:57:09:460] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:57:09:587] pkt.length - 0xf8␍␊
[15:57:09:588] pkt.totalLength - 0x0␍␊
[15:57:09:591] pkt.ctrl.byte - 0x9␍␊
[15:57:09:592] pkt.crc - 0x0␍␊
[15:57:09:594] pkt.has_crc - 0x0␍␊
[15:57:09:729] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:57:09:856] pkt.length - 0xf8␍␊
[15:57:09:857] pkt.totalLength - 0x0␍␊
[15:57:09:859] pkt.ctrl.byte - 0x9␍␊
[15:57:09:861] pkt.crc - 0x0␍␊
[15:57:09:863] pkt.has_crc - 0x0␍␊
[15:57:09:992] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:57:10:119] pkt.length - 0xf8␍␊
[15:57:10:120] pkt.totalLength - 0x0␍␊
[15:57:10:123] pkt.ctrl.byte - 0x9␍␊
[15:57:10:125] pkt.crc - 0x0␍␊
[15:57:10:126] pkt.has_crc - 0x0␍␊
[15:57:10:260] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:57:10:428] pkt.length - 0xf8␍␊
[15:57:10:430] pkt.totalLength - 0x0␍␊
[15:57:10:432] pkt.ctrl.byte - 0x9␍␊
[15:57:10:434] pkt.crc - 0x0␍␊
[15:57:10:435] pkt.has_crc - 0x0␍␊
[15:57:10:528] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:57:10:655] pkt.length - 0xf8␍␊
[15:57:10:657] pkt.totalLength - 0x0␍␊
[15:57:10:659] pkt.ctrl.byte - 0x19␍␊
[15:57:10:661] pkt.crc - 0x0␍␊
[15:57:10:662] pkt.has_crc - 0x0␍␊
[15:57:10:664] Starting Segment 82␍␊
[15:57:10:666] FtmRxWarning2 Segment restarted, retryLength=8186␍␊
[15:57:10:670] segmentLength=3720␍␊
[15:57:10:672] receivedLength=4197␍␊
[15:57:10:674] totalValidReceivedLength=405982␍␊
[15:57:10:800] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:57:10:926] pkt.length - 0xf8␍␊
[15:57:10:928] pkt.totalLength - 0x0␍␊
[15:57:10:930] pkt.ctrl.byte - 0x9␍␊
[15:57:10:932] pkt.crc - 0x0␍␊
[15:57:10:934] pkt.has_crc - 0x0␍␊
[15:57:11:069] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:57:11:196] pkt.length - 0xf8␍␊
[15:57:11:197] pkt.totalLength - 0x0␍␊
[15:57:11:199] pkt.ctrl.byte - 0x9␍␊
[15:57:11:201] pkt.crc - 0x0␍␊
[15:57:11:203] pkt.has_crc - 0x0␍␊
[15:57:11:340] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:57:11:467] pkt.length - 0xf8␍␊
[15:57:11:469] pkt.totalLength - 0x0␍␊
[15:57:11:470] pkt.ctrl.byte - 0x9␍␊
[15:57:11:472] pkt.crc - 0x0␍␊
[15:57:11:473] pkt.has_crc - 0x0␍␊
[15:57:11:609] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:57:11:735] pkt.length - 0xf8␍␊
[15:57:11:738] pkt.totalLength - 0x0␍␊
[15:57:11:740] pkt.ctrl.byte - 0x9␍␊
[15:57:11:742] pkt.crc - 0x0␍␊
[15:57:11:743] pkt.has_crc - 0x0␍␊
[15:57:11:880] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:57:12:007] pkt.length - 0xf8␍␊
[15:57:12:008] pkt.totalLength - 0x0␍␊
[15:57:12:011] pkt.ctrl.byte - 0x9␍␊
[15:57:12:012] pkt.crc - 0x0␍␊
[15:57:12:014] pkt.has_crc - 0x0␍␊
[15:57:12:146] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:57:12:273] pkt.length - 0xf8␍␊
[15:57:12:275] pkt.totalLength - 0x0␍␊
[15:57:12:277] pkt.ctrl.byte - 0x9␍␊
[15:57:12:279] pkt.crc - 0x0␍␊
[15:57:12:280] pkt.has_crc - 0x0␍␊
[15:57:12:415] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:57:12:541] pkt.length - 0xf8␍␊
[15:57:12:543] pkt.totalLength - 0x0␍␊
[15:57:12:545] pkt.ctrl.byte - 0x9␍␊
[15:57:12:547] pkt.crc - 0x0␍␊
[15:57:12:549] pkt.has_crc - 0x0␍␊
[15:57:12:685] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:57:12:812] pkt.length - 0xf8␍␊
[15:57:12:814] pkt.totalLength - 0x0␍␊
[15:57:12:816] pkt.ctrl.byte - 0x9␍␊
[15:57:12:818] pkt.crc - 0x0␍␊
[15:57:12:819] pkt.has_crc - 0x0␍␊
[15:57:12:948] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:57:13:075] pkt.length - 0xf8␍␊
[15:57:13:077] pkt.totalLength - 0x0␍␊
[15:57:13:079] pkt.ctrl.byte - 0x9␍␊
[15:57:13:081] pkt.crc - 0x0␍␊
[15:57:13:083] pkt.has_crc - 0x0␍␊
[15:57:13:221] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:57:13:348] pkt.length - 0xf8␍␊
[15:57:13:350] pkt.totalLength - 0x0␍␊
[15:57:13:352] pkt.ctrl.byte - 0x9␍␊
[15:57:13:354] pkt.crc - 0x0␍␊
[15:57:13:355] pkt.has_crc - 0x0␍␊
[15:57:13:489] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:57:13:616] pkt.length - 0xf8␍␊
[15:57:13:618] pkt.totalLength - 0x0␍␊
[15:57:13:620] pkt.ctrl.byte - 0x9␍␊
[15:57:13:622] pkt.crc - 0x0␍␊
[15:57:13:623] pkt.has_crc - 0x0␍␊
[15:57:13:757] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:57:13:884] pkt.length - 0xf8␍␊
[15:57:13:885] pkt.totalLength - 0x0␍␊
[15:57:13:886] pkt.ctrl.byte - 0x9␍␊
[15:57:13:889] pkt.crc - 0x0␍␊
[15:57:13:891] pkt.has_crc - 0x0␍␊
[15:57:14:025] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:57:14:152] pkt.length - 0xf8␍␊
[15:57:14:153] pkt.totalLength - 0x0␍␊
[15:57:14:156] pkt.ctrl.byte - 0x9␍␊
[15:57:14:157] pkt.crc - 0x0␍␊
[15:57:14:159] pkt.has_crc - 0x0␍␊
[15:57:14:291] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:57:14:461] pkt.length - 0xf8␍␊
[15:57:14:463] pkt.totalLength - 0x0␍␊
[15:57:14:465] pkt.ctrl.byte - 0x9␍␊
[15:57:14:467] pkt.crc - 0x0␍␊
[15:57:14:468] pkt.has_crc - 0x0␍␊
[15:57:14:563] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:57:14:689] pkt.length - 0xf8␍␊
[15:57:14:691] pkt.totalLength - 0x0␍␊
[15:57:14:694] pkt.ctrl.byte - 0x19␍␊
[15:57:14:695] pkt.crc - 0x0␍␊
[15:57:14:697] pkt.has_crc - 0x0␍␊
[15:57:14:698] Starting Segment 82␍␊
[15:57:14:700] FtmRxWarning2 Segment restarted, retryLength=11906␍␊
[15:57:14:704] segmentLength=3720␍␊
[15:57:14:707] receivedLength=4197␍␊
[15:57:14:709] totalValidReceivedLength=405982␍␊
[15:57:14:833] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:57:14:960] pkt.length - 0xf8␍␊
[15:57:14:961] pkt.totalLength - 0x0␍␊
[15:57:14:963] pkt.ctrl.byte - 0x9␍␊
[15:57:14:965] pkt.crc - 0x0␍␊
[15:57:14:967] pkt.has_crc - 0x0␍␊
[15:57:15:102] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:57:15:229] pkt.length - 0xf8␍␊
[15:57:15:231] pkt.totalLength - 0x0␍␊
[15:57:15:233] pkt.ctrl.byte - 0x9␍␊
[15:57:15:235] pkt.crc - 0x0␍␊
[15:57:15:236] pkt.has_crc - 0x0␍␊
[15:57:15:374] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:57:15:501] pkt.length - 0xf8␍␊
[15:57:15:503] pkt.totalLength - 0x0␍␊
[15:57:15:505] pkt.ctrl.byte - 0x9␍␊
[15:57:15:507] pkt.crc - 0x0␍␊
[15:57:15:509] pkt.has_crc - 0x0␍␊
[15:57:15:644] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:57:15:771] pkt.length - 0xf8␍␊
[15:57:15:772] pkt.totalLength - 0x0␍␊
[15:57:15:774] pkt.ctrl.byte - 0x9␍␊
[15:57:15:776] pkt.crc - 0x0␍␊
[15:57:15:778] pkt.has_crc - 0x0␍␊
[15:57:15:912] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:57:16:039] pkt.length - 0xf8␍␊
[15:57:16:041] pkt.totalLength - 0x0␍␊
[15:57:16:043] pkt.ctrl.byte - 0x9␍␊
[15:57:16:045] pkt.crc - 0x0␍␊
[15:57:16:046] pkt.has_crc - 0x0␍␊
 [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[16:00:21:188] pkt.length - 0xf8␍␊
[16:00:21:195] pkt.totalLength - 0x0␍␊
[16:00:21:195] pkt.ctrl.byte - 0x9␍␊
[16:00:21:195] pkt.crc - 0x0␍␊
[16:00:21:195] pkt.has_crc - 0x0␍␊
[16:00:21:288] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[16:00:21:415] pkt.length - 0xf8␍␊
[16:00:21:422] pkt.totalLength - 0x0␍␊
[16:00:21:422] pkt.ctrl.byte - 0x19␍␊
[16:00:21:422] pkt.crc - 0x0␍␊
[16:00:21:422] pkt.has_crc - 0x0␍␊
[16:00:21:434] Starting Segment 82␍␊
[16:00:21:434] FtmRxWarning2 Segment restarted, retryLength=184018␍␊
[16:00:21:434] segmentLength=3720␍␊
[16:00:21:434] receivedLength=4197␍␊
[16:00:21:446] totalValidReceivedLength=405982␍␊
[16:00:21:555] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[16:00:21:682] pkt.length - 0xf8␍␊
[16:00:21:689] pkt.totalLength - 0x0␍␊
[16:00:21:689] pkt.ctrl.byte - 0x9␍␊
[16:00:21:689] pkt.crc - 0x0␍␊
[16:00:21:689] pkt.has_crc - 0x0␍␊
[16:00:21:827] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[16:00:21:952] pkt.length - 0xf8␍␊
[16:00:21:959] pkt.totalLength - 0x0␍␊
[16:00:21:959] pkt.ctrl.byte - 0x9␍␊
[16:00:21:959] pkt.crc - 0x0␍␊
[16:00:21:970] pkt.has_crc - 0x0␍␊
[16:00:22:092] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[16:00:22:219] pkt.length - 0xf8␍␊
[16:00:22:227] pkt.totalLength - 0x0␍␊
[16:00:22:227] pkt.ctrl.byte - 0x9␍␊
[16:00:22:227] pkt.crc - 0x0␍␊
[16:00:22:227] pkt.has_crc - 0x0␍␊
[16:00:22:358] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[16:00:22:485] pkt.length - 0xf8␍␊
[16:00:22:486] pkt.totalLength - 0x0␍␊
[16:00:22:495] pkt.ctrl.byte - 0x9␍␊
[16:00:22:495] pkt.crc - 0x0␍␊
[16:00:22:495] pkt.has_crc - 0x0␍␊
[16:00:22:623] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[16:00:22:750] pkt.length - 0xf8␍␊
[16:00:22:751] pkt.totalLength - 0x0␍␊
[16:00:22:761] pkt.ctrl.byte - 0x9␍␊
[16:00:22:761] pkt.crc - 0x0␍␊
[16:00:22:761] pkt.has_crc - 0x0␍␊
[16:00:22:891] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[16:00:23:018] pkt.length - 0xf8␍␊
[16:00:23:026] pkt.totalLength - 0x0␍␊
[16:00:23:026] pkt.ctrl.byte - 0x9␍␊
[16:00:23:026] pkt.crc - 0x0␍␊
[16:00:23:026] pkt.has_crc - 0x0␍␊
[16:00:23:157] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[16:00:23:284] pkt.length - 0xf8␍␊
[16:00:23:286] pkt.totalLength - 0x0␍␊
[16:00:23:297] pkt.ctrl.byte - 0x9␍␊
[16:00:23:297] pkt.crc - 0x0␍␊
[16:00:23:297] pkt.has_crc - 0x0␍␊
[16:00:23:429] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[16:00:23:556] pkt.length - 0xf8␍␊
[16:00:23:557] pkt.totalLength - 0x0␍␊
[16:00:23:566] pkt.ctrl.byte - 0x9␍␊
[16:00:23:566] pkt.crc - 0x0␍␊
[16:00:23:566] pkt.has_crc - 0x0␍␊
[16:00:23:700] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[16:00:23:827] pkt.length - 0xf8␍␊
[16:00:23:837] pkt.totalLength - 0x0␍␊
[16:00:23:837] pkt.ctrl.byte - 0x9␍␊
[16:00:23:837] pkt.crc - 0x0␍␊
[16:00:23:837] pkt.has_crc - 0x0␍␊
[16:00:23:966] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[16:00:24:093] pkt.length - 0xf8␍␊
[16:00:24:103] pkt.totalLength - 0x0␍␊
[16:00:24:103] pkt.ctrl.byte - 0x9␍␊
[16:00:24:103] pkt.crc - 0x0␍␊
[16:00:24:103] pkt.has_crc - 0x0␍␊
[16:00:24:232] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[16:00:24:359] pkt.length - 0xf8␍␊
[16:00:24:362] pkt.totalLength - 0x0␍␊
[16:00:24:371] pkt.ctrl.byte - 0x9␍␊
[16:00:24:371] pkt.crc - 0x0␍␊
[16:00:24:371] pkt.has_crc - 0x0␍␊
[16:00:24:498] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[16:00:24:625] pkt.length - 0xf8␍␊
[16:00:24:626] pkt.totalLength - 0x0␍␊
[16:00:24:635] pkt.ctrl.byte - 0x9␍␊
[16:00:24:635] pkt.crc - 0x0␍␊
[16:00:24:635] pkt.has_crc - 0x0␍␊
[16:00:24:769] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[16:00:24:896] pkt.length - 0xf8␍␊
[16:00:24:899] pkt.totalLength - 0x0␍␊
[16:00:24:908] pkt.ctrl.byte - 0x9␍␊
[16:00:24:908] pkt.crc - 0x0␍␊
[16:00:24:908] pkt.has_crc - 0x0␍␊
[16:00:25:041] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[16:00:25:209] pkt.length - 0xf8␍␊
[16:00:25:219] pkt.totalLength - 0x0␍␊
[16:00:25:219] pkt.ctrl.byte - 0x9␍␊
[16:00:25:219] pkt.crc - 0x0␍␊
[16:00:25:219] pkt.has_crc - 0x0␍␊
[16:00:54:603] [../Core/Src/main.c][HAL_RTCEx_AlarmBEventCallback][1028] Alarm B Interrupt␍␊
[16:01:25:275] NFC DFU packet reception timeout.␍␊

 

 

  • Binary Size Test: I tested another binary file that is 423 KB in size, and it worked fine, completing the transfer and switching to the new firmware successfully.  


Please let me know if you need any additional details or further clarification. 

Best regards,
Rahul

Hello Rahul,

looking at your traces it seems indeed you are using quite an old version of FTM driver.

The first comment is I would recommend you to update the FTM driver being used to the latest version.

The STSW-ST25DV002 package on st.com has been updated in the past months with many enhancements and bug fixes. I warmly recommend you to have a look to this new package and to port it on your product.

The packages contain a file (...\Middlewares\ST\ST25FTM\Docs\PortingFTM.txt) listing main actions to port the old FTM in your application to the new version.

Moreover, you can find some few documentation on st.com related to the FTM:
- AN5512: details the FTM component APIs
- UM2949: details the FTM protocol
- UM3078: details the use of FTM component on Linux

 

The second comment is related to your Binary Size test.

AFAIU, with another bigger binary file (and even with a smaller file) the FW upgrade is passing. It seems the problem is in some way linked to the FW being uploaded.

Could you please check if this segment #82 is supposed to be the last segment to be sent in such case this could explain the communication is failing due to an error in final segment sending format. Indeed, it appears in your traces the pkt.ctrl.byte is not correct with the last packet of segment #82 thus the multiple retries: it should be set to 0x69 (with b4b5 meaning LAST_PKT) whereas here it is set to 0x19 (with b4b5 meaning FIRST_PKT), there is a consistency issue here:

[15:57:06:423] Ending Segment 81␍␊
[15:57:06:424] receivedLen=5085␍␊
[15:57:06:427] validLen=4951␍␊
[15:57:06:428] totalvalid=405982␍␊
[15:57:06:430] FtmRx Continue reception␍␊
[15:57:06:506] RxState = FTM_READ_CMD␍␊
[15:57:06:508] [../Core/Src/main.c][HAL_GPIO_EXTI_Callback][1120] NFC Interrupt␍␊
[15:57:06:636] pkt.length - 0xf8␍␊
[15:57:06:638] pkt.totalLength - 0x0␍␊
[15:57:06:639] pkt.ctrl.byte - 0x19␍␊    <<<< normal value as it is first packet of segment #82
[15:57:06:642] pkt.crc - 0x0␍␊
[15:57:06:644] pkt.has_crc - 0x0␍␊
[15:57:06:644] Starting Segment 82␍␊

...

[15:57:10:655] pkt.length - 0xf8␍␊
[15:57:10:657] pkt.totalLength - 0x0␍␊
[15:57:10:659] pkt.ctrl.byte - 0x19␍␊    <<<< Should be 0x69 here !!
[15:57:10:661] pkt.crc - 0x0␍␊
[15:57:10:662] pkt.has_crc - 0x0␍␊
[15:57:10:664] Starting Segment 82␍␊
[15:57:10:666] FtmRxWarning2 Segment restarted, retryLength=8186␍␊

...

[15:57:14:689] pkt.length - 0xf8␍␊
[15:57:14:691] pkt.totalLength - 0x0␍␊
[15:57:14:694] pkt.ctrl.byte - 0x19␍␊      <<<< Should be 0x69 here !!
[15:57:14:695] pkt.crc - 0x0␍␊
[15:57:14:697] pkt.has_crc - 0x0␍␊
[15:57:14:698] Starting Segment 82␍␊
[15:57:14:700] FtmRxWarning2 Segment restarted, retryLength=11906␍␊

...

 

So two recommendations here:

  • do the porting to the latest FTM version
  • check the reason the pkt.ctrl.byte is not correct (0x19 instead of 0x69) with the last packet of (last?) segment

 

best regards,
Cedric.

Hello Cedric,

Thank you for the detailed feedback.

I appreciate the recommendation to update the FTM driver. I’ll review the latest version of the STSW-ST25DV002 package on st.com and use the PortingFTM.txt file to guide the transition to the updated version. The documentation references you provided—API details (AN5512), protocol overview (UM2949), and Linux usage (UM3078)—will be invaluable for this process.

Currently, I’m engaged with other priority tasks in my project, so I’ll plan the porting to the latest FTM version once these tasks are complete. I’ll update you once I begin the migration.

Regarding the Binary Size test, I’ll also investigate further, particularly with segment #82. Your insight about the pkt.ctrl.byte inconsistency (showing 0x19 as FIRST_PKT instead of 0x69 as LAST_PKT in the final packet) helps clarify the multiple retries observed in the logs. I’ll verify if segment #82 is indeed the last and check that the final packet’s control byte is correctly set.

Thanks again for the valuable guidance on both the driver update and the control byte consistency issue.

Best regards,
Rahul