28335 flash programming via embedded coder

2 views (last 30 days)
Bulent D
Bulent D on 21 Mar 2014
Commented: Xu Liu on 27 Aug 2019
Hello,
I am using F28335 DSP for my inverter drive project. The code was developed using embedded coder (R2012a) and ccs3.3. The code includes ADC (analog to digital converter). When the code is ran from RAM it is ok. But when it is ran from Flash the code does not respond anything. When ADC is excluded from the code it runs from flash too. The problems seem to be caused by existence of ADC in the code. What can be the problem. help please..
greetings, B Dag
  1 Comment
Junyi Shen
Junyi Shen on 5 Dec 2014
Any progress on this topic? I have the same problem and would like to discuss the solution?
Any expert from Matlab community to solve the problem? Thanks!

Sign in to comment.

Answers (1)

Antonin
Antonin on 22 Jan 2015
Hi Bulent, Hi Junyi,
  1. There is a bug that affects the code running out of flash if your PLL DIVSEL is selected to 1.Please read the following page and verify if this problem affects you and the MATLAB release you are using: Bug report 917503
  2. On the F28335, execution out of flash is much slower than execution out of RAM. The same code can overrun if it is executed out of Flash compared to RAM.
  • Make sure that you can run some simple code that has plenty of time to run out of flash, like a blink LED, this will validate that your flash settings are correct.
  • If you realize that the flash code you want to run is crashing because of an overrun condition, you can speed up the flash execution by running code out of the ramfuncs section. In this case the code is loaded in flash, will be copied to RAM at startup and will execute from RAM. The steps to perform this operation are described in the video attached to the following file exchange submission: Motor Control with TI LaunchPad The section explaining ramfuncs starts at around 8:30 in the video, the same technique used for the F28027 will apply to the F28335.
I hope it helps,
Good luck,
Antonin.
  2 Comments
Ross Chen
Ross Chen on 16 Aug 2019
Edited: Ross Chen on 16 Aug 2019
Hi, Atonin
I was trying to set up F28335 in Simulink(Matlab 2019a). My objective is to let F28335 MCU boot from flash and after that the boot, copy the code from RAM from the Flash and execution the code in the RAM to avoid overrun.
I was trying to follow the steps in the video you refered in your answers. However, in Matlab 2019, if I select the targe hardware to be F28335 (boot from flash), the "code_ramfuncs" option is not avaiable in the "Configuration Parameters-->Code Generation--> Memory Sections". Only "default" is aviable in every pulldown menue. Please see the attached picture.
So, I am not sure how to set up in Simulink to acheive the "copy the code to RAM at startup and execute from RAM".
Do you have any idea how that can be set in newier version of Matlab and Simulink?
Thank you in advance.
Chen
Xu Liu
Xu Liu on 27 Aug 2019
Hello, I didn't find ‘Memory Sections’ in the ‘Code Generation’area you said. I recently did the work of 28335 code generation. I used more 377d before. so I didn't care too much about the performance problem. Now I need to consider the efficiency of the operation with 335. We maybe exchange ideas in this area.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!