From 56c4647afb2907ec0e6ecaa4359eb191c7ff2418 Mon Sep 17 00:00:00 2001 From: turbocool3r Date: Tue, 11 Jun 2024 16:23:40 +0300 Subject: [PATCH] Make MF0/NTAG tx buffer size appropriate for large NTAG fast reads. --- firmware/application/src/rfid/nfctag/hf/nfc_mf0_ntag.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/firmware/application/src/rfid/nfctag/hf/nfc_mf0_ntag.h b/firmware/application/src/rfid/nfctag/hf/nfc_mf0_ntag.h index 6b49ead..2005cec 100644 --- a/firmware/application/src/rfid/nfctag/hf/nfc_mf0_ntag.h +++ b/firmware/application/src/rfid/nfctag/hf/nfc_mf0_ntag.h @@ -44,7 +44,9 @@ typedef struct __attribute__((aligned(4))) { nfc_tag_mf0_ntag_information_t; typedef struct { - uint8_t tx_buffer[NFC_TAG_NTAG_FRAME_SIZE]; + // TX buffer must fit the largest possible frame size. + // TODO: This size should be decreased as the maximum allowed frame size is 257 (see 6.14.13.36 in datasheet). + uint8_t tx_buffer[NFC_TAG_NTAG_BLOCK_MAX * NFC_TAG_MF0_NTAG_DATA_SIZE]; } nfc_tag_mf0_ntag_tx_buffer_t; int nfc_tag_mf0_ntag_data_loadcb(tag_specific_type_t type, tag_data_buffer_t *buffer);