Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
New Contributor I
1,255 Views

Intel Edison pwm using mraa not going low

Jump to solution

Hi

I'm using the pwm3 interface for starting a vibration motor, so I wrote these functions for it

# define MRAA_PWM3_PIN_NUM 21

void InitVibrationPWM(void) {

pwm3Context = mraa_pwm_init(MRAA_PWM3_PIN_NUM);

mraa_pwm_enable (pwm3Context,0);

mraa_pwm_period_us(pwm3Context, 1000);

mraa_pwm_pulsewidth_us(pwm3Context,500);

}

void StartVibrationPWM(void) {

mraa_pwm_enable (pwm3Context,0);

mraa_pwm_pulsewidth_us(pwm3Context,500);

mraa_pwm_enable (pwm3Context,1);

}

void StopVibrationPWM(void) {

mraa_pwm_enable (pwm3Context,0);

mraa_pwm_pulsewidth_us(pwm3Context,1);

}

 

 

 

 

But the issue is when I stop and start the PWM several times the PWM output wont get low when I eventually stop the PWM, that line always stays high eventhough I called StopVibrationPWM(). This happens randomly so that I cant figure out the exact issue.

Any thoughts

0 Kudos

Accepted Solutions
Highlighted
Community Manager
3 Views

Re: Intel Edison pwm using mraa not going low

Jump to solution

Hi Hari_CR,

 

 

This is indeed a known issue, and hopefully it will be fixed in the future. If you read all the interactions from the GitHub link you provided, you could see that a workaround/fix has already been proposed by alext-mkrs (you can see it here https://github.com/intel-iot-devkit/mraa/pull/515 https://github.com/intel-iot-devkit/mraa/pull/515), so hopefully this one will be implemented soon.

 

 

Regards,

 

-Pablo

View solution in original post

0 Kudos
2 Replies
Highlighted
New Contributor I
3 Views

Re: Intel Edison pwm using mraa not going low

Jump to solution

Hi recently I found this stating that, this might be a hardware issue. Can somebody from intel verify that

https://github.com/intel-iot-devkit/mraa/issues/91 [API] PWM should disable pin when 0 is written · Issue # 91 · intel-iot-devkit/mraa · GitHub

0 Kudos
Highlighted
Community Manager
4 Views

Re: Intel Edison pwm using mraa not going low

Jump to solution

Hi Hari_CR,

 

 

This is indeed a known issue, and hopefully it will be fixed in the future. If you read all the interactions from the GitHub link you provided, you could see that a workaround/fix has already been proposed by alext-mkrs (you can see it here https://github.com/intel-iot-devkit/mraa/pull/515 https://github.com/intel-iot-devkit/mraa/pull/515), so hopefully this one will be implemented soon.

 

 

Regards,

 

-Pablo

View solution in original post

0 Kudos