Erase Previous Build in Flash Memory of TMS320F28379D using simulink

9 次查看(过去 30 天)
I was running a blink led simulation with TMS320F28379D using simulink. I ran the program with "boot from Flash" selected. The program ran ok. However, now whenever I connect my launchpad into pc, LEDs keeps on blinking. Is there any way to erase the previous build stored in the flash memory using simulink so that from now on, whenever I turn on my launchpad, those LEDs does not blink ?

回答(1 个)

Asim
Asim 2024-1-31
Hello Sachin,
When you program a TMS320F28379D LaunchPad with the "boot from Flash" option, the code is written to the non-volatile flash memory of the microcontroller. This means that the program will persist even after power cycling the device, causing the LEDs to blink each time the LaunchPad is powered on.
To stop the LEDs from blinking on startup, you need to erase the program stored in the flash memory. Here's how you can do this using Simulink:
1. Create an Erase Block:
  • Open Simulink and create a new model.
  • Add the necessary blocks to your model to configure the microcontroller for code generation, but instead of a functional algorithm, implement a simple operation that does not involve the LEDs or any other peripherals (e.g., a no-operation or a simple variable assignment).
  • Configure the model to run for a limited time or to perform no significant actions.
2. Configure the Model:
  • Go to the Configuration Parameters dialog box in your Simulink model.
  • Under 'Hardware Implementation', make sure that the correct target hardware is selected.
  • In the 'Target Hardware Resources' section, configure the 'Build options' to 'Boot from Flash'.
3. Build and Load the Erase Program:
  • Build the Simulink model. This will generate the code and a new binary file.
  • Load the generated program onto your TMS320F28379D LaunchPad using the same process you used to flash the LED blink program.
This process should overwrite the previous LED blinking program with a new program that effectively does nothing, which will stop the LEDs from blinking when the LaunchPad is powered on.
If you have access to Code Composer Studio (CCS), you can utilize the 'Clean' feature found within the 'Project' menu to directly erase the flash memory.
I hope this helps.
Best Regards,
Asim Asrar

类别

Help CenterFile Exchange 中查找有关 Simulink 的更多信息

产品


版本

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by