SST26 driver example
I launched the Harmony3 example "async_nvm_sst26_read_write_pic32mz_ef_sk" into my pic32mz starter kit with a SST25VF064C (notice is not a SST26!) and it executes the example successfully with erase, write and read operations.
In the original project it erases, writes and reads into 4 sectors of 4KB each, so it defines a buffer size like:
#define SST26_BUFFER_SIZE (16384U)
Now I would like to increase this buffer size into 9 sectors so the total amount would be:
#define SST26_BUFFER_SIZE (36864U)
But increasing any value above 16384 just causes the program go into the STATE_ERROR. I revised the code and everything seems to be fine like for example the sector or page size matches with my memory even is not the same model. The example has a function to calculate the required block sizes for its operations:
geometry = DRV_MEMORY_GeometryGet(appSST26Data.memoryHandle);
if (geometry == NULL)
appSST26Data.state = APP_SST26_STATE_ERROR;
appSST26Data.numReadBlocks = (SST26_BUFFER_SIZE / geometry->geometryTable[GEOMETRY_TABLE_READ_ENTRY].blockSize);
appSST26Data.numWriteBlocks = (SST26_BUFFER_SIZE / geometry->geometryTable[GEOMETRY_TABLE_WRITE_ENTRY].blockSize);
appSST26Data.numEraseBlocks = (SST26_BUFFER_SIZE / geometry->geometryTable[GEOMETRY_TABLE_ERASE_ENTRY].blockSize);
I would expect that some incompatibility can cause errors or program halting but the original example works straight away, so I don't really know what I'm missing for increasing the erase/write/read buffer size...
Thanks in advance