Hello,
yes with this sample it work. I have tried to disable the debug but same
proble happen with the TPM2 used like pwm. When i press a button the
function TPM_DRV_PwmStop(LCD_PWM_IDX, &LCD_PWM_ChnConfig0, 0); is called
and after that i switch the frequency:
if (CLOCK_SYS_GetCurrentConfiguration() != 1) {
error = CLOCK_SYS_UpdateConfiguration(1,
kClockManagerPolicyForcible);
//CLOCK_SYS_SetConfiguration(&clockMan1_InitConfig0);
i = CLOCK_SYS_GetCoreClockFreq();
//LPSCI_HAL_SetBaudRate(UART0_BASE_PTR, i, 115200);
I2C0_SetClockConfiguration();
ADC_SetClockConfiguration();
}
when the button is newely pressed i do
if(CLOCK_SYS_GetCurrentConfiguration() != 0){
error = CLOCK_SYS_UpdateConfiguration(0,
kClockManagerPolicyForcible);
//CLOCK_SYS_SetConfiguration(&clockMan1_InitConfig0);
i = CLOCK_SYS_GetCoreClockFreq();
//LPSCI_HAL_SetBaudRate(UART0_BASE_PTR, i, 115200);
TPM_DRV_SetClock(LCD_PWM_IDX, kTpmClockSourceModuleClk,
kTpmDividedBy32);
I2C0_SetClockConfiguration();
ADC_SetClockConfiguration();
}
to restore the cpu to higher frequency but when i call the function
TPM_DRV_PwmStart(LCD_PWM_IDX, &LCD_PWM_ChnConfig0, 0); it don't run
correctly. The MOD register is set to FFFFF bacause the function
CLOCK_SYS_GetPllFllClockFreq(); (called as in the image) return 0
Il 02/03/2016 10:30, Alice_Yang ha scritto:
>
NXP Community
<https://community.freescale.com/?et=watches.email.thread>
>
fsl_debug problem change frequency
risposta da Alice_Yang
<https://community.freescale.com/people/Alice_Yang?et=watches.email.thread>
su /Kinetis Design Studio/ - Visualizza la discussione completa
<https://community.freescale.com/message/620493?et=watches.email.thread#620493>
>