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.

TMS320F280039C: Store value in FLASH

Part Number: TMS320F280039C
Other Parts Discussed in Thread: C2000WARE

i have two quetsions when i'm using TMS320F280039C as the controller of my driver :

1 Driver will output a ~20ns pulse to F280039C ( there will be around 12 drivers on the PCB) every 2us repeatdly , can you please let me know which group of GPIO can detect a ~ 20ns pulse ( VOH 3.3V , VOL 0V ) 

2 after F280039C receive this pulse , assuming it can detect it , it will be counted in the internal counter ( stored in RAM i suppose) . and since there's 12 drivers on the board there will be 12 sets of data stored in RAM.  For every 5 minutes or so , we can erase the one of the three flash bank and store the count data from RAM to flash while the RAM is still running. after another 5 mins will erase flash and overwrite it with the latest content from RAM. Some one told me that there's a EEPROM emulator to treat the flash as EEPROM. but i'm not sure if this a "Gen 2 " C2000 device. Even if it's not and EEPROM emulator is can not be used, i can still use ram-> flash to store my data , is this understanding correct ?

  • Hi Floyd,

    1 Driver will output a ~20ns pulse to F280039C ( there will be around 12 drivers on the PCB) every 2us repeatdly , can you please let me know which group of GPIO can detect a ~ 20ns pulse ( VOH 3.3V , VOL 0V ) 

    JC: All the GPIOs are able to detect a pulse that is at least 1 SYSCLK period duration(for the case of F28003x, 1 SYSCLK period is 1/120MHz or 8.333nS) so a pulse that is at least 20nS can be detected by the GPIOs.

    2 after F280039C receive this pulse , assuming it can detect it , it will be counted in the internal counter ( stored in RAM i suppose) . and since there's 12 drivers on the board there will be 12 sets of data stored in RAM.  For every 5 minutes or so , we can erase the one of the three flash bank and store the count data from RAM to flash while the RAM is still running. after another 5 mins will erase flash and overwrite it with the latest content from RAM. Some one told me that there's a EEPROM emulator to treat the flash as EEPROM. but i'm not sure if this a "Gen 2 " C2000 device. Even if it's not and EEPROM emulator is can not be used, i can still use ram-> flash to store my data , is this understanding correct ?

    JC: Yes, you can basically treat a portion of flash like EEPROM.  There is an app note on how to do this on Gen 3 devices.  Please refer to this link: SPRADE8B

    Regards,

    Joseph

  • Thank you for your detailed information on question 1. 

    for question 2 , is this requires additional library imported to the device/IDE? or i can just use the default setup to achieve this " treat a portion of flask like EEPROM" . 

    Apologies for this simple question. i'm not very familar with MCU applications 

  • Hello Floyd,

    No worries.  EEPROM emulation on the flash bank requires Flash API library and headers and this is already included in the C2000Ware package.  If you look at the examples in SPRADE8B application note, the Flash API library and headers are incorporated in the project and also illustrates how to program/erase sectors in flash.  If you are running your code in flash and temporarily logging the number of GPIO toggles in RAM as scratch pad before programming the data in flash then you need to plan out which sectors are from your main code and which sector is used for logging the GPIO toggle data.  All these are illustrated in the application note example.

    Regards,

    Joseph