Other Parts Discussed in Thread: SEGGER
Previous posting:
https://e2e.ti.com/support/microcontrollers/tiva_arm/f/908/t/610763
It seems there might be a possibility the PWM module is not able to reset all counters to zero via Tivaware syntax or the order of such procedure is highly relative. Yet the generators time base via software are made synchronous after a peripheral reset however the 3 generators counters in CCS debug fail to roll count values concurrently to each other.
Could there be an issue using ROM calls to zero the counters? Is there a specific syntax order or delay period required to ensure all generators are reset to zero count? How can we use CCS debug to ensure all generators counts are reset to zero when count registers are otherwise so varied in counting values. Especially true in light of ICDI updates 1Mhz is considered to slow to even prove equal generator counts occur after peripheral reset.
Perhaps we need Black Hawk XDS200 or Segger high speed debug simulation speeds order to prove yea or neigh?
/* Disable the PWM module */ ROM_SysCtlPeripheralDisable(SYSCTL_PERIPH_PWM0); /* Reset the PWM module zero the counters */ ROM_SysCtlPeripheralReset(SYSCTL_PERIPH_PWM0); /* Enable the PWM module counters at zero count */ ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_PWM0); /* Pause here until PWM0 module is ready */ while(!(ROM_SysCtlPeripheralReady(SYSCTL_PERIPH_PWM0))) { } /* Divide 120Mhz SYSCLK for 60Mhz PWMCLK */ HWREG(PWM0_BASE + PWM_O_CC) = PWM_SYSCLK_DIV_2; /* Configure the generators various functions */ // // /* Enables the PWM clock to drive the timer/counter of the PWM generators. */ ROM_PWMGenEnable(PWM0_BASE, PWM_GEN_0); ROM_PWMGenEnable(PWM0_BASE, PWM_GEN_1); ROM_PWMGenEnable(PWM0_BASE, PWM_GEN_2); ROM_PWMGenEnable(PWM0_BASE, PWM_GEN_3); /* Synchronize the PWM generators time bases. */ HWREG(PWM0_BASE + PWM_O_SYNC) = (PWM_GEN_0_BIT | PWM_GEN_1_BIT | PWM_GEN_2_BIT | PWM_GEN_3_BIT);