SCT0 peripheral generated code wrong?

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

SCT0 peripheral generated code wrong?

3,177件の閲覧回数
cedricjehasse
Contributor II

When configuring SCT0 in the peripherals, i think the generated code is wrong when selecting `Start L/unified counter`

This adds the following line to the generated SCT0_init function:

 

  SCTIMER_StartTimer(SCT0_PERIPHERAL, kSCTIMER_Counter_L);

 

this doesn't work, there's no pwm output. If i change kSCTIMER_Counter_L to kSCTIMER_Counter_U, it does work.

config tools version is 11.0 and  the MCU is a LPC54005JBD100

thanks,

Cedric

0 件の賞賛
返信
3 返答(返信)

3,127件の閲覧回数
jch
NXP Employee
NXP Employee

Hi Cedric,

you're right, thanks for bug report, it will be corrected in the next version.

Best regards

Jiri

0 件の賞賛
返信

3,154件の閲覧回数
Petr_H
NXP Employee
NXP Employee

Hi,

I'm not sure where is the problem in this case, however, could you write more about your goal with SCTimer?

If it's more than just very simple PWM, I recommend to use the SCTimer register init component that allows to leverage all capabilities of the hardware and it's not dependent on SDK driver. 

To add this component you can use the Components view and clock on the '+' button at Register initialization category:

Petr_H_0-1655209192461.png

Best regarts

Petr Hradsky

Config Tools Team

0 件の賞賛
返信

3,147件の閲覧回数
cedricjehasse
Contributor II

Hi,

our goal is to have a simple pwm.

For us the issue is fixed by manually starting the timer like this isof the generated code:

SCTIMER_StartTimer(SCT0_PERIPHERAL, kSCTIMER_Counter_U);

Just wanted to report this in case someone else runs into it.

Thanks for the suggestion on register init. I'll have a look if we ever need more advanced pwm.

Best regards,

Cedric

0 件の賞賛
返信