i.MX6 servo control using pwm..

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

i.MX6 servo control using pwm..

2,345 Views
kane
Contributor I

hello all,

I am trying to control a small <5V servo motor.

I have Linux knowledge but new to PWM.

doing a bit analysis  i found there is support for backlight/led  control for pwm, is it possible to use this pwm system to drive servo motor ??.

Thanks

Kane

Labels (4)
Tags (3)
0 Kudos
3 Replies

882 Views
igorpadykov
NXP Employee
NXP Employee

Hi kane

I think yes, please look at 8.3 Backlight Control for LCDs

Linux Software User Manual (i.MX6) - BlueWiki

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos

882 Views
kane
Contributor I

i am using a marsboard from embest:

i tried by adding the below to board-mx6q_marsboard.c

static struct platform_pwm_backlight_data mx6_marsboard_ldb_backlight_data1 = {

    .pwm_id = 1,

    .max_brightness = 255,

    .dft_brightness = 0,

    .pwm_period_ns =20000000,  //20ms the default cycle time for a 50 hz motor

}


then


imx6q_add_mxc_pwm_backlight(1, &mx6_marsboard_lcd_backlight_data1);


still no response, however my servo blades move randomly during bootup.

no idea which pwm pulses are driving them.

plz share any example code to control servo using pwm.

i heard the way servo driven by pwm is different from led driven by pwm.

Thanks

Kane

0 Kudos

882 Views
igorpadykov
NXP Employee
NXP Employee

Please check

https://community.freescale.com/message/433746#433746

i.MX 6Series Platform SDK : Bare-metal SDK

For Mars board specific questions please post to this

board forum.

Best regards

igor

0 Kudos