Skip to main content
CWill.2
Visitor II
October 11, 2026
Question

R3_2_g4xx can get stuck

  • October 11, 2026
  • 0 replies
  • 3 views

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