SCT0 peripheral generated code wrong?

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

SCT0 peripheral generated code wrong?

3,220 次查看
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,167 次查看
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,194 次查看
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,190 次查看
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 项奖励
回复