Other Parts Discussed in Thread: CONTROLSUITE, TMS320F28377D
Hi
Could someone tell me how to get Flash api for F28377xD please.
Kind Regards
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.
Other Parts Discussed in Thread: CONTROLSUITE, TMS320F28377D
Hi
Could someone tell me how to get Flash api for F28377xD please.
Kind Regards
Hello Anish,
Here is the Flash API for F28377xD.
8561.F021_API_F2837xD_FPU32.lib
You can get example codes if you installed TI ControlSUITE.
(if the default installation directory was used):
C:\ti\controlSUITE\device_support\F2837xD\v110\F2837xD_examples_Dual\flash_programming
Best Regards,
Richard Park
Please click the Verify Answer button on this post if it answers your question.
Hello,
I have used and tested the F021_API_F2837xD_FPU32.lib with the Control Card (TMS320F28377D) and the example project, too.
But I have the problem, that it is not possible to "overwrite" a flash address content with all zeros (0x0000) if another value than 0xFFFF is previously programmed.
From my experience a flash controller can always program zero bit. We use this function very often to set Flags internally from valid to invalid.
This behaviour can also been seen with the flash programming example project within the control suite when writing again to the same flash address but with a buffer content of all zeros (0x0000).
Could you please help me?
Is this a "bug" in hardware or firmware? How can I go on?
Thanks for any help and comments....
Best regards,
Jeremias Reith
Jeremias,
You might have noticed that Flash has ECC feature in F2837xD. ECC is enabled at power-up and hence ECC has to be programmed for the application in Flash (at least up to the initialization code where user's application would enable/disable ECC) to avoid ECC errors. For every 64-bits of data (aligned on 64-bit boundary), 8 ECC bits have to be programmed to avoid ECC errors when ECC is enabled.
In your case, I see that you are trying to program data in Flash using the API.
In this case, you have four options:
(1) Program 64-bits of data at a time along with ECC using AutoEccGeneration mode. If you do this, you can keep the ECC enabled when your application reads the programmed data in Flash. (I guess you used AutoEccGeneration mode when programming the Flash. When you use this option, you will not be able to re-program the Flash bits since ECC is already programmed for that 64-bit slice).
(2) If you can not program 64-bits at a time and also want to keep the ECC enabled when reading the data from Flash, you can use AutoEccGeneration mode and program 1 word (16-bits) or 2 words or 3 words at a time and leave the remaining words un-programmed. This means that you can not re-program those un-programmed addresses in that 64-bit slice. They should be left as 0xFFFF.
(3) If you don't need ECC for Flash reads, then you can disable ECC and program 1 word (or as low as a bit as you mentioned) at a time at any Flash address using DataOnly mode. In this case, if Flash is read with ECC enabled, ECC errors will occur. Hence, you have to disable ECC before reading Flash (You can disable ECC by writing a value of zero at address 0x5fB00. You can find a corresponding C-code statement in InitFlash function).
(4) If you want to enable ECC for Flash reads and also want to program only 1 word (or as low as one bit) at a time, then you can first program the data 1 word (or as low as one bit) at a time using Dataonly mode (and of course you have to disable ECC when calling verify functions or in general before using Flash API functions) and later when you have all the 64-bits of data (four 16-bit words), you can reprogram the 64-bits using AutoEccGeneration mode. Once you program the 64-bits using AutoEccGeneration mode, you can read the Flash with ECC enabled.
Hope this helps.
Thanks and regards,
Vamsi
Hi Vamsi,
many thanks for your great explanations about Flash Programming & ECC. This helps a lot in understanding how to use the Flash API (ECC enabled or disabled).
I have already tested and the hardware really did what you explained.
Many Thanks!
Best regards,
Jeremias