BCM20737S Timer Module

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hello,

I have a Wiced Sense Module and I am trying to get some precise control of the PWM functionality and for that I require a 32KHz timer interrupt to update the PWM value.

From what I have read, the fine timers maximum resolution is 1KHz.

Is there a way to call an interrupt every few microseconds to update the PWM.

Also from the datasheet I can't figure out a way to change the duty cycle of the PWM.

Please help on these us

0 Likes
1 Solution
asridharan
Employee
Employee
10 comments on KBA 5 comments on KBA First comment on KBA

There is no 32KHz timer/crystal in the WICED Sense module. The highest resolution (soft) application timer is the 12.5mS fine timer.

> I am looking in the 3.1.1 SDK and not finding the PWM_Tones application.

Did you mean WICED Smart SDK 2.1.1?

View solution in original post

11 Replies
MichaelF_56
Moderator
Moderator
Moderator
250 sign-ins 25 comments on blog 10 comments on blog

Within the SDK, take a look at the PWM_Tones application in the /apps directory.

In addition, this thread is very informative: Re: Different Frequencies for PWM

There are many other threads on PWM usage as well.

0 Likes
Anonymous
Not applicable

That still doesn't help with my first question.

Is there a way to call an interrupt every time the PWM wraps up.

The SDK doesn't show a way to register interrupts with Timers or PWM.

The only Timer I can find is the fine timer.Is there any other timer available with better precision?

0 Likes
Anonymous
Not applicable

I don't think that the SDK has anything finer than 1ms resolution.

0 Likes
Anonymous
Not applicable

I am looking in the 3.1.1 SDK and not finding the PWM_Tones application.

0 Likes

v3.1.1 is current for WICED Wi-Fi

This question was posted to the WICED Smart forum, so you'd need to look at SDK v2.1.1 specific to WICED Smart.

0 Likes
Anonymous
Not applicable

sorry... I am new to the group.  I will download that SDK so I can follow along.  Will this conflict with my WICED WiFi SDK?

Thanks.

0 Likes

No apologies needed.  Welcome aboard!

0 Likes
asridharan
Employee
Employee
10 comments on KBA 5 comments on KBA First comment on KBA

There is no 32KHz timer/crystal in the WICED Sense module. The highest resolution (soft) application timer is the 12.5mS fine timer.

> I am looking in the 3.1.1 SDK and not finding the PWM_Tones application.

Did you mean WICED Smart SDK 2.1.1?

Anonymous
Not applicable

Hello,

I see a header hw_timer.h.Can I use the callbacks from this to interrupt every 30microseconds?

It seems like it might work.Will that affect the workings of the bluetooth stack?

0 Likes

> I see a header hw_timer.h.Can I use the callbacks from this

Yes, you can. But remember that this callback will be invoked in interrupt context and you are expected to return in under 100uS or you risk serious performance issues with the BLE connection.

> to interrupt every 30microseconds? Will that affect the workings of the bluetooth stack?

This will most likely trip the watchdog. Bluetooth tasks are the highest priority tasks in the system and any application activity under about every 3.5mS will interfere with BT activity.

The PWM itself generates pulses. Do you need to change the pulse rate (width/frequency) every 30uS?

0 Likes
Anonymous
Not applicable

Yes I need to change the pulse rate every 30 uS or so .

0 Likes