I have problem to get a pwm clock.

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

I have problem to get a pwm clock.

960 次查看
yeongtaehan
Contributor I

Hello.

I'm using KW019032EU board


I want to make a 1Mhz pwm clock by using Processor Expert

This is my code.

int main(void)

/*lint -restore Enable MISRA rule (6.3) checking. */

{

  /* Write your local variable definition here */

  /*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/

  PE_low_level_init();

  /*** End of Processor Expert internal initialization.                    ***/

  /* Write your code here */

  /* For example: for(;;) { } */

  TPM_DRV_Init(TPM0_IDX,&tpmTmr1_InitConfig0);

  TPM_DRV_PwmStart(TPM0_IDX,&tpmTmr1_ChnConfig0,4);

  /*** Don't write any code pass this line, or it will be deleted during code generation. ***/

  /*** RTOS startup code. Macro PEX_RTOS_START is defined by the RTOS component. DON'T MODIFY THIS CODE!!! ***/

  #ifdef PEX_RTOS_START

    PEX_RTOS_START();                  /* Startup of the selected RTOS. Macro is defined by the RTOS component. */

  #endif

  /*** End of RTOS startup code.  ***/

  /*** Processor Expert end of main routine. DON'T MODIFY THIS CODE!!! ***/

  for(;;){}

  /*** Processor Expert end of main routine. DON'T WRITE CODE BELOW!!! ***/

} /*** End of main routi

ne. DO NOT MODIFY THIS TEXT!!! ***/

0.6v.jpg

But i have problem. when I get the clock, it always have voltage 0 to 0.6v

How can i  get a 3.3v clock?

标签 (2)
0 项奖励
回复
2 回复数

747 次查看
yeongtaehan
Contributor I

I found a way.

I changed a pin channel. I got a 3.3v clock. it is working fine.

Thank you

0 项奖励
回复

747 次查看
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi

You have to be sure that clock source for the TPM Module is not cero.

What is your clock initialization for TPM Module? Could you show that picture?

captures3.png

Best Regards

Mario

0 项奖励
回复