i.MX51 buzzer driver using IO

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

i.MX51 buzzer driver using IO

1,141 Views
alsaleem
Contributor I

Hi,

Is there a way to output a variable frequency signal (audio range, 200-4K) square wave from i.MX51 to drive an external buzzer?

 

Thanks.

Tags (1)
0 Kudos
Reply
3 Replies

975 Views
JerryFan
NXP Employee
NXP Employee
That's right, PWM is designed for brightness tuning, but it can also be used flexibly.  Actually, the PERIOD can be programmed (see Chapter 47.2.2.5, mx51RM for the detail.)  and  the frequency is much accurate that GPIO way. Anyway, if the accuracy  is not important, such as for a buzzer, the GPIO method should be OK.
0 Kudos
Reply

975 Views
alsaleem
Contributor I

The driver only allows to set the pulse width not frequency (fixed on initialization) using brightness. How do I change the PWM frequency?

Thanks.

0 Kudos
Reply

975 Views
JerryFan
NXP Employee
NXP Employee
PWM was recommended for this case. It is more accurate and need less arm core's involvement.
0 Kudos
Reply