Real-time PWM control in a F2808 ezdsp kit through USB emulator ??

Hai , This is Sharath, started using vis sim software from past two days . I was able to generate PWM from ePWM module in the kit and saw the output in scope. The problem i am facing in varying duty cycle ratio of the PWM . Every time i have to change the slider value and download the code. I used target configuration block for real time simulation but was unable to do so. Even example project didnt work F2808ePWM-d. The error which was encountered "Target CPU did not respond". Need assistance real time simulation for DC-DC buck converter and inverter projects.Suggest the tutorials to be read & user guides & also videos. Reply back at ""


I do Understand i'm asking too many questions. I will exploit the software more and then start developing project

Hi Anders

I have installed the UniFlash software but still was not to able flash the code in flash memory. How is Vis sim giving input to the controller, by writting in correspondin control registers or through communication interface?? And i have installed digital power design but i dont see any individual components like MOSFETs, BJTs or DC-DC converters. What about input to a I2cC module ?? How to give serial set data ??

Regards, Sarath

You ask many questions! For

You ask many questions!

  1. For Uniflash issues, please contact TI as it is a TI product. Did you check the Target Flash option in the VisSim codegen dialog?
  2. VisSim provides values to (and reads values from) your controller running on the TI target by using the JTAG interface.
  3. The aim of VisSim/Digital Power Designer is to develop a working controller which can be directly downloaded to a MCU to be used in digital power applications. No other simulation program currently available can do that better than VisSim. Digital Power Designer lets you configure RdsOn/Off and Ron/Roff for all commonly used analog power stages, but does not give you individual MOSFETs to build your own power circuit. The objective of the digital power block set is not to perform analog circuit simulation with analog components like resistors, inductors and capacitors. In general, adding an extra component like a simple resistor does not change the control loop significantly enough to worry about including it. Many of the typical analog power supply component models are already available like RC filters, power LC filters etc. The digital power blocks are intended to model most of the basic power supply configurations so that one can use them in a control loop simulation and verify the control loop without the need for your hardware or without risking damaging your hardware. Therefore, you can develop your control routine much more flexibly, simulate, verify and make any needed corrections before you send your gerbers out to get your hardware manufactured. When your hardware arrives, you can use VisSim and the digital power designer again to download the diagram to a MCU and test your real hardware.
    Another advantage of VisSim and the Digital Power Designer is that all typical power supply topologies are provided for you. This greatly speeds development of your digital power control diagram. Unique to VisSim/Digital Power is the many working examples which you can use as a starting point for your power supply. Other simulation programs do not provide you with such worked examples and you are left to struggle and learn how to use them the hard way and having to develop all your needed examples on your own.
  4. For I2C you can set the buffer size in I2C Config..., then you can write strings or individual bytes to the I2C Write block until your packet is full, then use the I2C Start block to start a receive or transmit on the I2C bus. Look under Embedded > Examples > Delfino > EEPromReadWriteF28335 to see an example.

Hi Anders & Sathya

Successfully was able to control PWM through VISSIM interface. But individual PWM module cannt be controlled, like if i want to control PWM1A alone through Vissim it was not possible. And can you help me with downloading code to Flash memory rather than on-chip RAM. Which settings should be checked?? I was able to download code selecting Flash but the code didnt run!!

You must configure the

You must configure the "Action Qualifier" section to get desired PWM waveform on PWM outputs A&B based on inputs A&B. See this post for more info on wPWM settings. Please attach your diagram so we can comment on why you can not control PWM1A output.

If you choose the flash option in codegen, then you must burn the .out file to flash using CCS. Or you can use the new TI "Uniflash" tool that TI has just released which you can download here.

Hi Sathya

I did the MCU config before only and generated .out file for PWM code. At that time only i was not able to select vissim communication interface. Should i generate code again after using target interface block??

You need to select the

You need to select the compound block you want to generate code for before invoking Tools > Code Gen...

MCU Config should sit on top

Hi Sharath,

I guess that you have not placed 'MCU Config' block in your diagram and hence the JTAG error. In your embedded diagram, please select MCU from Embedded > F280x > MCU Config. Select your CPU and select the correct JTAG. Hit 'OK' and place the block in your diagram. Then select the compound block, select 'Communication Interface' and Generate Code. I hope it solves your problem.

Regards, Satya.

Hi Anders

I was not able to select vissim communication interface during the codegen process . Which add-on should i download for that ?

Hi Anders,

The video was of great help. It made concepts clear. I have one more query, can vissim communicate through USB to my eZdsp board or JTAG is must?? and During code gen process the vis sim communication interface doesnt occur ?? My vissim software is trial version . Is it possible to communicate in a trial version??. And thanks for immediate response sir.

The eZdsp board has on-board

  1. The eZdsp board has on-board USB JTAG which VisSim can use. You must select "F208x eZdsp USB" in the JTAG Connection drop down from Embedded > F280x > MCU Config...
  2. No JTAG connection is required or used for code gen.
  3. All VisSim features work during 60-day trial.

error found was this

"Target Failed to Respond. Target PC=0x8251" and the value 8251 changes dynamically every time

Sarath, it appears that you

Sarath, it appears that you failed to check "Include VisSim Communication Interface" when you compiled. Watch this short video to see how to create diagrams that communicate back to the PC while they run.
To design, simulate and implement a buck converter, use our Digital Power Designer addon

Hi Sharath, Try to flash

Hi Sharath,

Try to flash program using following procedure,

  1. In CCS be sure that the target has been configured (Target > New Target Configuration)
  2. Launch TI Debugger (Target > Launch TI Debugger)
  3. Connect to target (Target > Connect Target)
  4. Load the program (Target > Load Program…) and Browse… to the .out file
  5. Click OK and the flash will program

After loading the program, reset the CPU and re-run the program.

Regards, Satya.