Features request : When PWMSP002 is stopped, set the outputs to passive level

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Not applicable
Following on from my previous post (see bottom of this post)

I would like to request that when the PWMSP002 app is stopped with the PWMSP002_Stop() function, the output signals return to the 'Passive Level'. This is essential when driving high and low side FET's in a bridge circuit. At present the PWMSP002 app sets it output signals to the NON 'Passive Level' if the 'After Compare Match' option is selected.

I suspect this issue applies to other PWM apps too.

Thank you very much.
Best regards
Aaron

http://www.infineonforums.com/threads/899-PWMSP002-Output-pins-do-not-return-to-passive-level-when-t...




0 Likes
14 Replies
Not applicable
Hi Aaron and hi to all
do you know whether your request has been fullfilled? has the pwm app been reviewed?
the feature you requested cannot be ignored...
I hope to have some feedback
samuele
0 Likes
Not applicable
Hi Sam,

I have had no feedback from Infineon so far but hopefully this is due to the European August holidays.

Best regards
Aaron
0 Likes
elegantk
Employee
Employee
Hi,

Yes... The concept/design of the CCU8 /ST for passive level is creating some problem for the user.

Workaround
1. Use the global bit CCUCON for both "External Stop" and "Trap" the timer slice
2. Use the Portx.IOCR

We have understand the concern of the application and we will improve it for future device.
0 Likes
Not applicable
Hi elegantk,

Could you please give a bit more detail on your suggested work around.

Also can you please give some indication of when the PWMSP002 passive level will be fixed. It is preventing me from shipping my products.

Thank you very much.
Best regards
Aaron
0 Likes
elegantk
Employee
Employee
For example, if PWMSP002 is using CCU80.CC80.

Configure Event 0 to external stop
- CC80INS.EV0IS to SCU.GLCCST80
- CC80INS.EV0EM to rising edge
- CC80CMC.ENDS to Event 0

Configure Event 2 to TRAP
- CC80INS.EV2IS to SCU.GLCCST80
- CC80INS.EV2LM to active on high level
- CC80CMC.TS = 1

*Make sure that CC80TC.TRAPE0,1,2,3 is configured.
*To stop the timer -> CCUCON.GSC80 = 1
0 Likes
Not applicable
Hi elegantk,

Thank you for the extra info, I will look into this method.

Just so I can plan ahead, can you tell me if the root cause is in the xmc4500 hardware or the PWMSP002 app and can you give an estimate of when the problem will be resolved.

Best regards
Aaron
0 Likes
Not applicable
Hi elegantk,

Unfortunately I cannot see a way to use the TRAP method as it requires linking to one of 16 a digital input pins. All of these pins are already utilized.

I will see if I can use the External Modulation method instead.

Once again, can you tell me if the root cause is in the xmc4500 hardware or the PWMSP002 app and can you give an estimate of when the problem will be resolved.

Best regards
Aaron
0 Likes
elegantk
Employee
Employee
Hi Aaron,

When the Event 2 is connected to SCU.GLCCST80, it does not use up any pin.
Please try out the following code.

Assume that PWMSP002 using P0.5 & P0.2. (CCU80.CC80)
Do not setup the TRAP in the UI configuration.

status = PWMSP002_Start(&PWMSP002_Handle0);

CCU80_CC80->INS|= (7<<8); // Event 2 to CCUCON
CCU80_CC80->INS|= (7<<0); // Event 0 to CCUCON
CCU80_CC80->INS|= (1<<16); // Event 0 rising edge

CCU80_CC80->CMC|= (1<<17); // TS = 1
CCU80_CC80->CMC|= (1<<2); // ENDS = Event 0

CCU80_CC80->TC|= (0xF<<17); // TRAPE0,1,2,3

for(delay=0;delay<10000;delay++);
SCU_GENERAL->CCUCON |=(1<<8);
0 Likes
Not applicable
Hi elegantk,

Unfortunately your suggestion did not work for me. Due to product launch deadlines I have implemented a work around. I will re-visit the problem in a few weeks.

Please can you tell me if the root cause is in the xmc4500 hardware or the PWMSP002 app and can you give an estimate of when the root problem will be resolved. This will help me plan the timescale for the product upgrade.

Thank you very much

Best regards
Aaron
0 Likes
Not applicable
Hi,
I think i corrected right the function. You just have to replace in CCU8PWMLIB.C the next funciton:

status_t CCU8PWMLIB_Stop(const CCU8PWMLIB_HandleType* HandlePtr)
{
status_t Status = (uint32_t)DAVEApp_SUCCESS;

/*Configure output connections as per passive state.*/
HandlePtr->CC8yRegsPtr->CHC &= ~((CCU8_CC8_CHC_OCS2_Msk)|(CCU8_CC8_CHC_OCS2_Msk));
HandlePtr->CC8yRegsPtr->CHC |=
(((uint32_t)HandlePtr->kPassiveLevel0 << CCU8_CC8_CHC_OCS1_Pos) |
(((~(uint32_t)HandlePtr->kPassiveLevel1 )<< CCU8_CC8_CHC_OCS2_Pos) & CCU8_CC8_CHC_OCS2_Msk));


/*<<>>*/
/*Clear RUN bit of the slice in use*/
HandlePtr->CC8yRegsPtr->TCCLR = CCU8PWMLIB_SLICE_CLEAR;

/*<<>>*/
if (HandlePtr->kTimerConcatenation == (uint8_t)SET)
{
/*Clear RUN bit of the slice in use*/
HandlePtr->CC8yRegs1Ptr->TCCLR = CCU8PWMLIB_SLICE_CLEAR;

}/*End of "if (HandlePtr->kTimerConcatenation == (uint8_t)SET)"*/
/**
* Set the IDLE mode only if Start parameter is set
*/


if(HandlePtr->Start == (uint8_t)SET)
{
HandlePtr->CC8yKernRegsPtr->GIDLS |= HandlePtr->StartMask;
}



return Status;
}

Bets Regards,
Bruno
0 Likes
Not applicable
Hi elegantk,

I found your answer below when searching for a different problem related to the CCU8 (on xmc4500).

My problem is that sometimes at setup the interrupt synchronizing my ADC and CCU8x stops.
The problem comes and goes between compilations if I include/remove dummy code in the setup code (changing the setup timing).

My question is why do you run the code "for(delay=0;delay<10000;delay++);" before you execute "CCU80 Global start enable".
I thought the global start was not active until I retrieve the CCU8x from idle mode.
Is there a known timing problem?



elegantk wrote:
Hi Aaron,

When the Event 2 is connected to SCU.GLCCST80, it does not use up any pin.
Please try out the following code.

Assume that PWMSP002 using P0.5 & P0.2. (CCU80.CC80)
Do not setup the TRAP in the UI configuration.

status = PWMSP002_Start(&PWMSP002_Handle0);

CCU80_CC80->INS|= (7<<8); // Event 2 to CCUCON
CCU80_CC80->INS|= (7<<0); // Event 0 to CCUCON
CCU80_CC80->INS|= (1<<16); // Event 0 rising edge

CCU80_CC80->CMC|= (1<<17); // TS = 1
CCU80_CC80->CMC|= (1<<2); // ENDS = Event 0

CCU80_CC80->TC|= (0xF<<17); // TRAPE0,1,2,3

for(delay=0;delay<10000;delay++);
SCU_GENERAL->CCUCON |=(1<<8);
0 Likes
elegantk
Employee
Employee
The purpose of the above code is to demonstrate the signal level when the timer stopped.
Thus, the timer will start first.
The delay is added so that we are differentiate the signal level when the timer start and timer stop.

1. Start the DAVE App timer
2. Reconfigure the timer register for other functionality
3. Delay for the timer to run for a while
4. Set "global enable bit" to stop the timer

*Usually, the "global enable bit" is used for synchronise start many timers.
*But for this special case, the "global enable bit" is use to stop the timer.
0 Likes
Not applicable
Hi elegantk,

Could you give me an update on the progress at Infineon for a fix so the PWMSP002 app leaves the output in the passive state please.

Thank you very much
Best regards
Aaron
0 Likes
P__Yélamos
Employee
Employee
10 sign-ins First like given 5 sign-ins
Hello,

when the timer stops, the Outputs are not modified. This is the normal way of operation. You can change the outputs after the timer stops by changing accordingly (set/clear) the ST signal. This is done by writing ot the bitfield SxSTyS/SxSTyC in GCSS/GCSC Register. For example:

CCU80->GCSS|= (1<
The complementary ST signal will switch accordignly. There is currently no API supporting this function. We will consider to add this.

BR
P. Yélamos
0 Likes