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: Digital Control (RampCtl) resetting constantly

Part Number: TMS320F280039C
Other Parts Discussed in Thread: C2000WARE

Hi,

I want to generate a ramp using RampCtl.h. I have included the file from C2000ware into my project. 

I initialized the RMPCNTL object to:

Then  fclRampControl(&RampControlHandler); is run every 1ms.

Debugging, I can see that RampDelayCount increases at every fclRampControl call. SetpointValue increases whenever the time comes, as shown in the following picture:

But right after this increase, if I click "Step Over" to control the execution of the code, it stops at the line shown in the following picture:

If I understood it properly, the compiler decided that that zone was to be left out, as indicated by the shaded lines, but it was not left out and not even that but also it is being run. If I step into, I get into the piece of code showed in the following picture:

Where this function compares 2000 and what should be 0.00001525f, but for some reason it indicates 0 while debugging, maybe due to casting.

My question is, why is the RampCtrl behaving like this? Id there any initial configuration I missed? Why is the MCU running code which the compiler shades?

Thanks and regards.