LizardLad_1
Posts: 69
Joined: Sat Jan 13, 2018 12:29 am

PWM on Pi 3?

Mon Jan 22, 2018 6:37 am

Is it possible to drive a servo in bare metal C using whatever pins are connected to hardware PWM? and if so how do I set the pins into PWM mode and write data to the pins?

User avatar
joan
Posts: 13460
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: PWM on Pi 3?

Mon Jan 22, 2018 8:20 am

There are plenty of C examples of talking directly to the hardware. E.g. my pigpio writes to the hardware peripheral (although the peripheral memory has been made accessible by a Linux mmap).

LizardLad_1
Posts: 69
Joined: Sat Jan 13, 2018 12:29 am

Re: PWM on Pi 3?

Mon Jan 22, 2018 8:23 am

Would you please share an example of how I could do this?

zedrummer
Posts: 38
Joined: Sun Jan 07, 2018 5:15 pm

Re: PWM on Pi 3?

Mon Jan 22, 2018 10:43 am

It seems there is something that correspond in this thread:
viewtopic.php?t=90130&start=100
Hope this helps

LizardLad_1
Posts: 69
Joined: Sat Jan 13, 2018 12:29 am

Re: PWM on Pi 3?

Wed Jan 24, 2018 7:05 am

The Circle environment is written in C++ and is very convoluted and hard to understand :?. Is there an example in C or ASM for the Pi 3?

LizardLad_1
Posts: 69
Joined: Sat Jan 13, 2018 12:29 am

Re: PWM on Pi 3?

Thu Jan 25, 2018 9:33 pm

If there are any Pi 1, 2, or zero examples that anybody has of hardware PWM please share them.

Return to “Bare metal, Assembly language”

Who is online

Users browsing this forum: No registered users and 6 guests