NFC DFU Unable to Upgrade When BIN Size is More Than 400KB
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:
- 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.
- Tried increasing buffer sizes: I increased the buffer size from 6000 to 15000, but the issue persists.
- Checked NFC connection and signal strength: No issues were detected with the NFC hardware or communication.
- 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␍␊
