This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Flash_API problem for TMS320F28027

Other Parts Discussed in Thread: TMS320F28027

Hi,

I am developing the program which program the flash of TMS320F28027 on my own develop board. The problem is that after programming the device using Flash API a one bit of one word(16bits) is not programmed. For an example - if I want program the whole flash with 0x0000 data, I run the program Flash_API function and after verifying I found that all memory content is 0x0001(not 0x0),..that's very strange.

I am filling the programming buffer during code execution via GPIO pins. I am sure that all sent data to TMS320 are received OK, because I implement very simple byte check function which calculate(in TMS320) the received words value and after 0x100 received values it send the calculated value to GPIO pins. When I read this calclulated value and compare it with sending data the result is that they is matched.


On the other hand I have found that if I fill the buffer direct in program and build program in CCS in this way, everything is programmed OK without any errors... So there is a difference if the programming buffer is filling with data during code execution or if the data is pre-builded in the program...


My program looks like this:

#define  WORDS_IN_FLASH_BUFFER 0x100       // Programming data buffer, Words
Uint16  Buffer[WORDS_IN_FLASH_BUFFER];     //buffer declaration

//now I read the data from GPIO and store it to the buffer
for (i = 0; i < WORDS_IN_FLASH_BUFFER; i++)
{
  Buffer[i] = readed_vaue_from_GPIO     //this is my function which reads data from GPIO pins
}

//Flash programming is invoked by this
Status = Flash_Program(Flash_ptr,Buffer,WORDS_IN_FLASH_BUFFER,&FlashStatus);

As I wrote, If i doing it this way(above), the programmed data is not OK.

On the other hand, If I do it in this way, the data will be proper programmed:

#define  WORDS_IN_FLASH_BUFFER 0x100       // Programming data buffer, Words
Uint16  Buffer[WORDS_IN_FLASH_BUFFER];     //buffer declaration

//now I read the data from GPIO and store it to the buffer
for (i = 0; i < WORDS_IN_FLASH_BUFFER; i++)
{
  Buffer[i] = 0;
}

//Flash programming is invoked by this
Status = Flash_Program(Flash_ptr,Buffer,WORDS_IN_FLASH_BUFFER,&FlashStatus);

What is the differences between this two buffer filling and why in one case the data is programmed OK and during real-time buffer filling the data is NOT programming OK?

Thank you!

Best regards,

Tomas