- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We use pwm_transitionToSubstituteValues() to control PWM, but it failed even the return value is true.
Is there any other PWM function?
The sample code we use is proximity_plus() in SDK 1.0.1
add the code in bleprox_mod_Create
gpio_configurePin(1,12,GPIO_OUTPUT_ENABLE, 0); // P28
// Configure ACLK as the reference clock of the PWM
aclk_configure(256000, ACLK1, ACLK_FREQ_24_MHZ);
ass the following function in the callback function bleprox_mod_appFineTimerCb()
pwm_start(PWM2,PMU_CLK,toggle_val,init_value);
Regards.
Licter
Solved! Go to Solution.
- Labels:
-
PWM
- Tags:
- application
- assist
- aware
- bcm20732s
- capability
- checking
- code
- components-peripheral
- control
- defined
- development
- docapiindex.html
- drivers-pwm
- enumerations
- functions
- marcos
- point
- provide
- sample
- team
- understanding
- utilizing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Did you disable output on the GPIO when you reset the PWM (and you can insert an internal pull-down/pull-up)? Do you have anything connected to the GPIO? If yes, then can you try disconnecting it and then see if the PWM goes low when you reset it?
case 6:
// Disable channel.
pwm_setReset(PWM0, 1);
gpio_configurePin(26/16, 26%16, GPIO_OUTPUT_DISABLE | GPIO_PULL_DOWN, 0);
break;