SCT0 peripheral generated code wrong?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SCT0 peripheral generated code wrong?

1,804 Views
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 Kudos
Reply
3 Replies

1,751 Views
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 Kudos
Reply

1,778 Views
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 Kudos
Reply

1,774 Views
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 Kudos
Reply