diff --git a/binaries/Tag_FW_1.54.bin b/binaries/Tag_FW_1.54.bin index d36400ce..69de9c17 100644 Binary files a/binaries/Tag_FW_1.54.bin and b/binaries/Tag_FW_1.54.bin differ diff --git a/binaries/Tag_FW_2.9-uc8151.bin b/binaries/Tag_FW_2.9-uc8151.bin index 3768cf80..59269da9 100644 Binary files a/binaries/Tag_FW_2.9-uc8151.bin and b/binaries/Tag_FW_2.9-uc8151.bin differ diff --git a/binaries/Tag_FW_2.9.bin b/binaries/Tag_FW_2.9.bin index 7df3a4f2..eba10bf4 100644 Binary files a/binaries/Tag_FW_2.9.bin and b/binaries/Tag_FW_2.9.bin differ diff --git a/binaries/Tag_FW_4.2.bin b/binaries/Tag_FW_4.2.bin index 592deb62..d5198482 100644 Binary files a/binaries/Tag_FW_4.2.bin and b/binaries/Tag_FW_4.2.bin differ diff --git a/binaries/Tag_FW_Pack.bin b/binaries/Tag_FW_Pack.bin index d8da01fd..2ecc0496 100644 Binary files a/binaries/Tag_FW_Pack.bin and b/binaries/Tag_FW_Pack.bin differ diff --git a/zbs243_Tag_FW/i2cdevices.h b/zbs243_Tag_FW/i2cdevices.h old mode 100644 new mode 100755 index 3de01803..bbf4a355 --- a/zbs243_Tag_FW/i2cdevices.h +++ b/zbs243_Tag_FW/i2cdevices.h @@ -6,5 +6,6 @@ bool supportsNFCWake(); void loadURLtoNTag(); void loadRawNTag(uint16_t blocksize); bool i2cCheckDevice(uint8_t address); +void i2cBusScan(); #endif \ No newline at end of file diff --git a/zbs243_Tag_FW/main.c b/zbs243_Tag_FW/main.c index 2ebdcc9f..d790a0a7 100755 --- a/zbs243_Tag_FW/main.c +++ b/zbs243_Tag_FW/main.c @@ -180,6 +180,9 @@ void main() { pr("BOOTED> %d.%d.%d%s\n", fwVersion / 100, (fwVersion % 100) / 10, (fwVersion % 10), fwVersionSuffix); powerUp(INIT_I2C); + + //i2cBusScan(); + if (i2cCheckDevice(0x55)) { powerDown(INIT_I2C); capabilities |= CAPABILITY_HAS_NFC; diff --git a/zbs243_Tag_FW/syncedproto.c b/zbs243_Tag_FW/syncedproto.c index d504d98f..14d4adf6 100755 --- a/zbs243_Tag_FW/syncedproto.c +++ b/zbs243_Tag_FW/syncedproto.c @@ -822,15 +822,14 @@ bool processAvailDataInfo(struct AvailDataInfo *__xdata avail) { powerDown(INIT_RADIO); return true; } + curBlock.blockId = 0; + xMemCopy8(&(curBlock.ver), &(avail->dataVer)); + curBlock.type = avail->dataType; xMemCopyShort(&curDataInfo, (void *)avail, sizeof(struct AvailDataInfo)); uint16_t __xdata nfcsize = avail->dataSize; + wdt10s(); if (getDataBlock(avail->dataSize)) { - powerUp(INIT_RADIO); - sendXferComplete(); - powerDown(INIT_RADIO); - curDataInfo.dataSize = 0; // mark as transfer not pending - powerUp(INIT_I2C); if (avail->dataType == DATATYPE_NFC_URL_DIRECT) { // only one URL (handle NDEF records on the tag) @@ -839,7 +838,11 @@ bool processAvailDataInfo(struct AvailDataInfo *__xdata avail) { // raw NFC data upload to the NFC IC loadRawNTag(nfcsize); } + timerDelay(13330); powerDown(INIT_I2C); + powerUp(INIT_RADIO); + sendXferComplete(); + powerDown(INIT_RADIO); return true; } return false; @@ -864,14 +867,17 @@ bool processAvailDataInfo(struct AvailDataInfo *__xdata avail) { powerDown(INIT_RADIO); return true; } + curBlock.blockId = 0; + xMemCopy8(&(curBlock.ver), &(avail->dataVer)); + curBlock.type = avail->dataType; xMemCopyShort(&curDataInfo, (void *)avail, sizeof(struct AvailDataInfo)); - + wdt10s(); if (getDataBlock(avail->dataSize)) { + curDataInfo.dataSize = 0; // mark as transfer not pending + memcpy(customLUT, sizeof(struct blockData) + blockXferBuffer, dispLutSize * 10); powerUp(INIT_RADIO); sendXferComplete(); powerDown(INIT_RADIO); - curDataInfo.dataSize = 0; // mark as transfer not pending - memcpy(customLUT, sizeof(struct blockData) + blockXferBuffer, dispLutSize * 10); return true; } #endif