Skip to main content
CWill.2
Visitor II
Oct 11, 2026 8:05 PM UTC
Question

R3_2_g4xx can get stuck

Hi
MCSDK 6.4.2

when a start is aborted, it can happen, that the code can get stuck in 

__weak void *R3_2_TIMx_UP_IRQHandler(PWMC_R3_2_Handle_t *pHandle)



while (0x0u != pHandle->pParams_str->ADCDataReg1[0]->JSQR)
{
/* Nothing to do */
}

i added this to fix it
 

    if (true == pHandle->_Super.PWMState)
{

by the way I don’t like having whiles in the code at all. And if nessesary please add a timeout.

In MCSDK 6.2.1 an overvoltage event, when no motor is running will also end up in a stuck while
 

__weak void R3_2_SwitchOffPWM(PWMC_Handle_t *pHdl) 

while (0U == LL_TIM_IsActiveFlag_UPDATE(TIMx))
{
/* Nothing to do */
}

that seams to be fixed in newer versions

1 reply

GMA
ST Technical Moderator
Oct 15, 2026 7:12 AM UTC

Hello ​@CWill.2,

Thank you for your feedback and your long-term interest in our products !
This point will be reported to the dedicated team to correct this point for next deliveries.

If you agree with the answer, please accept it by clicking on 'Best answer'.Best regards.GMA