SC-TIMER Handler problem

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

SC-TIMER Handler problem

1,134 次查看
VIGNESH_BABU
Contributor II

Hi,

In LPC55S16 Microcontroller ,where using Sc-timer to generate the PWM pluses with the certain intervals.But in Handler it react differently.For example if I give 3 count it generate the 3 Pluses but it generate one pluses.References here I below attached image for the references.Thank you. 

0 项奖励
回复
3 回复数

1,109 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @VIGNESH_BABU 

Could you please describe your project and requirement more detail? 

" I give 3 count it generate the 3 Pluses but it generate one pluses."

->> Please give more description about this, thanks.

Also there is PWM demo under SDK, you can firstly refer to it.

And you can use configuration tool to configure. 

 

BR

Alice

 

0 项奖励
回复

1,071 次查看
VIGNESH_BABU
Contributor II

Hi,

" I give 3 count it generate the 3 Pluses but it generate one pluses."

Detailed description:

Hi,

   Here we working on SC Timer to generate the pulses in various duty cycle with the pulse period of 1200 ns. We verified the SDK example which generate proper duty cycle as the requirement. 

    Here i need some clarification on Handler call back. For one  pulse(ON&OFF) generation using SC-Timer, how many times the Handler will call?

   Why because, while we look on this, Handler is called for 3 times for a single pulse(ON&OFF) generation.

   Here is the configuration we done for the pulse generation using SC-Timer is attached.

  Is any EVENT/STATE configuration need to be done for single Handler callback for every pulse generation? (or) It is a standard handler callback?

  

0 项奖励
回复

1,023 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @VIGNESH_BABU 

Thanks for your reply.

Handler should be called 1 time for a single pulse(ON&OFF) generation. How about first testing the SDK demo "lpcxpresso55s16_sctimer_pwm_with_dutycyle_change" on your side. See how many interrupts handler be called for each PWM pulse. 

On demo code, enable SCTIMER PWM interrupt code:

/* Enable interrupt flag for event associated with out 4, we use the interrupt to update dutycycle */

SCTIMER_EnableInterrupts(SCT0, (1 << eventNumberOutput));

 

/* Receive notification when event is triggered */

SCTIMER_SetCallback(SCT0, SCTIMER_LED_HANDLER, eventNumberOutput);

 

/* Enable at the NVIC */

EnableIRQ(SCT0_IRQn);

 

 

 

If this demo works well on your board. Please refer to the code development yours.

 

BR

Alice

0 项奖励
回复