Looking for assistance on C program in linux for pwm generation on bldc motor using BBB

Hi All,
This is Sonu an embedded engineer seeking for an assistance from everyone who could provide a C program in linux userspace mode to control bldc motor connected to Beagle bone black board.
Iam using Nuvoton ESC motor controller to drive the bldc motor(SUN FUN 2207-2450kv motor).
Awaiting for your response.
Thanks and regards,
Sonu.

My opinion is to find a different control that is better documented. I looked up the data sheet and nothing more than a sales brochure. It mentions 3 different boards and has some rambling c source code.

If the manufacture cannot provide instructions that are not cryptic and void of what you really need to know, just move on to another vendor. Wasting time on dead end stuff and they will drag you down too. Date on that doc is 2018 so it is very stale on top of other issues.

A brushless servo will demand something better than timing derived from a linux OS. More than likely your pwm will have to come from PRU or you will not be happy. Steppers and brushless are night and day on position accuracy. Look for something that is spi, i2c input. Make sure they have fully documented control instructions.

Hi Sonu!

There’s a C example in the nuvoTon manual.

It’s usuing 11 GPIO, 6 PWM and ADC lines. In order to handle that kind of lines in a similar manner (with common API), I recommend using libpruio, check examples.

Regards

1 Like

The BBAI64 Has the capability to drive BLDC motors using the ICSSG PRU’s. One pwm has 6 outputs for the 3 phases a, negative and positive going output pulses. Using the AM64B-SK I have been able to get the ouputs to cycle correctly using a polled output but haven’t gone the next step using interrupts. If someone has an example I sure would be interested. I have been using the AM64B-SK to develop PRU C code and porting it to the BBAI64.

1 Like