- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Solved! Go to Solution.
- Tags:
- bcm2737s
- wiced sense
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't think that the SDK has anything finer than 1ms resolution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am looking in the 3.1.1 SDK and not finding the PWM_Tones application.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No apologies needed. Welcome aboard!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
> 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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes I need to change the pulse rate every 30 uS or so .