2022-01-25 06:08 AM
Hello,
I am working on the bootloader, trying to flash only 256 bytes. So, before flashing, erasing the block 0xFF0000. There is already some data in this block. But erase is not happenin, even if FlashErase() returns 0 and FlashCheckStatus() also gives opResult=0. Also when I check memory, it still shows the same data and not erased.
Following below steps to get flash block erased-
#define LOWBLOCKSELECT 0x00000100U
#define MIDBLOCKSELECT 0x00000000U
#define HIGHBLOCKSELECT 0x00000000U
/* Unlock the requested block for Erase operation */
nLargeBlockSelect.firstLargeBlockSelect = 0;
nLargeBlockSelect.secondLargeBlockSelect = 0;
SetLock(&FLSHM_ssdConfig, C55_BLOCK_LOW, UNLOCK_ALL_BLOCKS);
irqIsrDisable();
/* Erase the requested block */
Return_Val = FlashErase(&FLSHM_ssdConfig, C55_ERASE_MAIN, LOWBLOCKSELECT, MIDBLOCKSELECT, HIGHBLOCKSELECT, nLargeBlockSelect);
if(Return_Val == C55_OK)
{
while(C55_INPROGRESS == FlashCheckStatus(&FLSHM_ssdConfig,
C55_MODE_OP_ERASE, &opResult, &FLSHM_eraseCtxData))
{}
/* Erase is in progress */
}
else
{
/* Erase failed */
}
irqIsrEnable();
Configuration for flash is as follows -
SSD_CONFIG FLSHM_ssdConfig = {
C55_REG_BASE, /* C55 control register base */
MAIN_ARRAY_BASE, /* base of main array */
{ 0, 0, 0 }, /* blocks info of low address space */
{ 0, 0, 0 }, /* blocks info of mid address space */
{ 0, 0, 0 }, /* blocks info of high address space */
0, /* number of blocks in 256K address space */
UTEST_ARRAY_BASE, /* base of UTEST array */
TRUE, /* interface flag indicate main or alternate interface */
256U,/* programmable size */
FALSE /* debug mode selection */
};
What could be the issue here?
Regards,
AM
2022-01-31 12:11 AM
Good morning,
Thank you for your comments.
I asked for support from R&D,
you should have an answer this week.
Best Regards,
-Olivier
2022-01-31 01:01 AM
Hi Olivier,
Good morning!
Thanks for the update.
One more heads up, as mentioned earlier, this flash erase is part of my bootloader code and I would prefer to execute it from Flash memory itself(instead of Load in RAM).
Awaiting to get this resolved soon.
Warm Regards,
AM
2022-02-04 06:42 AM
Hello,
R&D had no time to provide an analysis for this issue this week.
I hope they could next one.
Best Regards,
-Olivier
2022-02-11 05:53 AM
hello,
It seems you are using an older version of this SSD (Standard Software Driver). Could you please download the new one (SPC58xEC-FLASH-0.2.2) and let me know? At the moment this new version is available only on TeamSpaces.
I confirm also the max PROGRAMMABLE_SIZE is 0x80.
BR,
Giovanni