ePWM in real time

Hi. I'm using an eZdsp F28335 from Texas. I'm trying to use the DSP in a hardware-in-the-loop with PWM, but it didn't work! If I use the same scheme, build the code and download, it works!

That something I need to do to work right? My scheme is just a slider gain that varies from 0 to 1, connected in a convert block and then connected to the F28335 PWM block.



Hi, IS ALWAYS OUTPUT OF DAC IN VISSIM A PWM SIGNAL.Analog signal other than PWM is possible or not.PWM signals are used in motor application and power converter application .I want to use for other application is it possible

VisSim fully supports the

VisSim fully supports the C2000 devices. They do not come with on-chip DACs. But they do have SPI, I2C, serial, GPIO, CAN and PWM. If you need a DAC, you can get a DAC chip with a SPI port and use VisSim to write to the SPI port.

Ok. Here is my model. Is


Here is my model. Is very simple. I just try to make changes in real time, but I can't do it!

Other doubt to me is which block is responsible for the read of a ADC channel. Is the same ports used by GPIO (but the input and analog mode)? If it's true, the mapping of the pins is alike the GPIOs?


Hmm. Looks like you may have found a problem

I don't see any PWM activity in pure simulation mode either. I've sent it on into the engineering boys to take a look. However, compiled mode works just fine.

Yes, the input block has a radio button to select Analog or Digital. Use ADC Config... to configure the channel. Yes, GPIOs can be input or output. Read this post to see the GPIO mapping

What you want to say with

What you want to say with "pure simulation mode"?

Like I said before, in real time mode, the PWM doesn't respond. But if I just use the command tools>>code gen... and download the code of the same model to the DSC, it works!

When I used real time in a simpler diagram (blink a LED), it works just fine like downloading the C code generated by Vissim.

Pure simulation mode

By this I mean that all blocks run in real-time in the VisSim environment on the PC except for DSP peripherals like PWM, GPIO, ADC and QEP which are accessed interactively via JTAG.
Perhaps I should call it "interactive DSP mode" since there is DSP communication involved. In any case, I am told by engineering that the latest build on our web site handles ePWM in interactive mode properly now.

I'm not sure...

I think there's some problems here. The model that I send to you, was made in this same version of Vissim and is the version that I'm using (Version 7.0).

I ran the ePWM example available in real time, including. But the responses isn't good. The signals generated by DSC are very nousy, and when I increase the duty cycle, the signal produced presents a DC offset.

That something that I need to do?


You need Version 7.0B3

Hi linklessa,
We periodically release updates (service packs in Microsoft speak) to fix bugs or add small features in a given version. The latest download on our website has a fix for F28335 PWM when running interactively. The F28335 PWM has a small difference from F280x ePWM that prevented it from operating properly in interactive mode in prior VisSim updates. Using version v7B3, interactive ePWM works perfectly for me. Most of our customers are using compiled mode anyway. If you are happy with compiled mode, then you do not need to download the B3 update. I have attached the test file used. It also blinks the LED on the eZdsp and reads ADC 0.

Please attach your test diagram to your post

That way we can see what you might be doing wrong.