LP-MSPM0G3507: Issue with the Flash API.

Part Number: LP-MSPM0G3507

Tool/software:

Hello Im facing an issue with the TIMSPM0G3507 lower Layer Flash API .
im using this implementation and using below
TI API

DL_FlashCTL_programMemoryBlocking64WithECCGenerated(FLASHCTL, tDestAdd,(uint32_t*)pub_Src, ul_length, DL_FLASHCTL_REGION_SELECT_MAIN);

Observation 1


the constraint here  is that when im calling this function from higher layer wrapper function
as shown below


as the flash alignment is 8 bytes
when im trying to write more than 8 bytes from the higher layer
the flash driver(TI_flash_API) is giving me error and entering into infinite loop
so here it is writing to Ram location which is ending to infinite loop or it is getting corrupted.
BBFLASH_DRV_WRITE(pub_src,tDestAdd,ul_sizeAligned);
here pub src is pointing to different RAM location and im not able to write anything it is bricked or going to infinite loop.

observation 2
Here if I write 32 bytes or more from higher layer with some code modifications
as below

it passes from the lower layer and here it is using different Ram location and does not end up in infinite while loop .
Here BBFLASH_DRV_WRITE(aub_FlashWriteBuffer,tDestAdd,ul_sizeAligned);
getting expected Ram location.Here im able to Write 32 bytes or whichever is required.
But here im not supposed to make the changes in Higher layer .

Summary
1. Is the lower layer API is accessible to all RAM locations ?

  • Hi Robin,

    The DL_FlashCTL_programMemoryBlocking64WithECCGenerated(FLASHCTL_Regs *flashctl, uint32_t address, uint32_t *data, uint32_t dataSize, DL_FLASHCTL_REGION_SELECT regionSelect) API has no limitation on the RAM address for data pointer. It just need to be within the M0G3507 SRAM range (such as 0x20200000-0x20208000). 

    But to be notice that this API should program data with 8bytes aligned. So you could only program with ul_sizeAligned=8,16,24,32... 

    And  when you say the program " is ending to infinite loop or it is getting corrupted", which infinite loop is program stuck? Could you show the source code about it?