I can't make fee code generated from halcogen write to flash on my TMS570LS0432 rev A.
I wrote a simple test. It initializes, write a block then reads the same block. The block is setup in HalCoGen to 4 bytes.
// Arrange
uint8 write_buffer[4];
uint8 read_buffer[4];
write_buffer[0]=0xDE;
write_buffer[1]=0xAD;
write_buffer[2]=0xBE;
write_buffer[3]=0xAF;
read_buffer[0]=0x00;
read_buffer[1]=0x00;
read_buffer[2]=0x00;
read_buffer[3]=0x00;
// Act
fee::TI_Fee_Init();
do
{
fee::TI_Fee_MainFunction();
}
while(fee::TI_Fee_GetStatus(0 )!=fee::IDLE);
fee::TI_Fee_ErrorCodeType errorCode;
Std_ReturnType result = fee::TI_Fee_WriteSync(1,write_buffer);
if (result)
{
errorCode = fee::TI_FeeErrorCode(0);
}
do
{
fee::TI_Fee_MainFunction();
}
while(fee::TI_Fee_GetStatus(0 )!=fee::IDLE);
result = fee::TI_Fee_ReadSync(1,0, read_buffer, 4);
if (result)
{
errorCode = fee::TI_FeeErrorCode(0);
}
do
{
fee::TI_Fee_MainFunction();
}
while(fee::TI_Fee_GetStatus(0 )!=fee::IDLE);
// assert
assert(write_buffer[0] == read_buffer[0]);
Is there anything wrong with code above?
I never seen any data for bank7, besides 0xFF in the memory view of IAR EW.
I've read on this forum others having similar problem writing to bank 7, but not really found the cure...
Best Regards
Henrik