Part Number: TPS65987EVM
Hello Team,
I am struggling to update Region pointer oFFSET address in SPI Flash attached onboard with TPS65987EVM
I am preparing a program to flash SPI as it is our requirement in fresh production board where we are going to flash SPI ROM from Host I2C via TPS65987.
As you can see the image I am trying to update Region Pointer address and offset.
But the same procedure which I am using to update address 0x00 and 0x1000 is not working for address 0xFFC and 0x1FFC
Due to this I am not able to point the Configuration stream address.
I have tried flashing in 64Bytes in sinle go by update Bit[60] Bit[61] Bit[62] and Bit[63] -> not working
I have tried to write 4096Bytes 4KB using loop after passing Regionpointer address location i.e. 0x00 and 0x1000 but it also didn't work.
Let me know if there is any constraint to update Region pointer offset or any special procedure required?
Look mycode snippet
None of the Methid are working
#######################################################################################
Method 1
#######################################################################################
bool addressUpdate()
{
bool result = 0;
//Writing full array of 4096 bytes For region 0
i2cDataFLemIn[0] = rgnPntr1Loc[0]; //rgnPntr1Loc[2] = {0x0, 0x1000};
i2cDataFLemIn[1] = rgnPntr1Loc[0] >>8;
i2cDataFLemIn[2] = rgnPntr1Loc[0] >>16;
i2cDataFLemIn[3] = rgnPntr1Loc[0] >>24;
i2cDataFLemIn[4] = 1;
fourCCerror = fourCC_Command(FLem, (uint8_t *)&i2cDataFLemIn);
DelayInMilliseconds(1000); //Wait for 1 seconds to read UART Stream in Putty terminal
// Set Address 0x00
fourCCerror = fourCC_Command(FLad, (uint8_t *)&rgnPntr1Loc[0]);
DelayInMilliseconds(1000); //Wait for 1 seconds to read UART Stream in Putty terminal
count8bit = 0;
bytesCount = 0;
for (count32bit = 0; count32bit < 64; count32bit++)
{
initCountUpDwn64((bool *) &count8bit, &bytesCount);
//Write DATA in 64 Bytes chunks
fourCCerror = fourCC_Command(FLwd, (uint8_t *)&i2cFlashData);
bytesCount = 64 * (count32bit+1);
count8bit += 1;
if (count8bit == 63)
{
UARTprintf("4kByte Block Written\n");
count8bit = 0;
}
}
/////////////////////////////////////////////////////////
//Region Pointers address completed for Region0
But offset is not update
/////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////
//Region Pointers address update start for Region1
/////////////////////////////////////////////////////////
Same code as above
#######################################################################################
#######################################################################################
#######################################################################################
Method 2
#######################################################################################
//Another method used to write only 64 bytes at time
i2cDataFLemIn[0] = rgnPntr2Loc[0]; //rgnPntr2Loc[2] = {(0x1000-0x40), (0x2000-0x40)};
i2cDataFLemIn[1] = rgnPntr2Loc[0] >>8;
i2cDataFLemIn[2] = rgnPntr2Loc[0] >>16;
i2cDataFLemIn[3] = rgnPntr2Loc[0] >>24;
i2cDataFLemIn[4] = 1;
//Erase Region0/1 Pointers in Data by Erasing 1 4kByte sector;
fourCCerror = fourCC_Command(FLem, (uint8_t *)&i2cDataFLemIn);
DelayInMilliseconds(1000);
//Set location 0xFC0
fourCCerror = fourCC_Command(FLad, (uint8_t *)&rgnPntr2Loc[0]);
init64ByteDataFF();
i2cFlashData[60] = 0x00;
i2cFlashData[61] = 0x00;
i2cFlashData[62] = 0x00;
i2cFlashData[63] = 0x00;
fourCCerror = fourCC_Command(FLwd, (uint8_t *)&i2cFlashData);
DelayInMilliseconds(1000); //Wait for 1 seconds to read UART Stream in Putty terminal
#######################################################################################
No success, unable to update 0xffc, 0xffd, 0xffe, 0xff
and also not able to update SPI ROM location
0x1ffc, 0x1ffd, 0x1ffe, 0x1ff
#######################################################################################