SC-TIMER Handler problem

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

SC-TIMER Handler problem

2,441件の閲覧回数
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 返答(返信)

2,416件の閲覧回数
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 件の賞賛
返信

2,375件の閲覧回数
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 件の賞賛
返信

2,327件の閲覧回数
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 件の賞賛
返信