Hi Rick, The servos I am using are Robotis Dynamixel servos. The servos themselves have (I believe) Atmega8 controllers in them to handle the actual PWM details. They use a 3 wire interface :1 power, 1 ground, and 1 half duplex 1Mbps serial line. I don't know how time variation tolerant my setup would be. The way I've done it on my other setups is to use a timer based interrupt that fires about every 8 milliseconds that updates the target values in memory, then pushes them to a circular buffer that feeds the UART, with a transmit register empty interrupt to pull the next byte. With the 1Mbps line used by the servos being an order of magnitude slower than the CPU updating things, I was thinking maybe that would have the effect of smoothing out any hiccups, so if there was a millisecond or two variation, it might not have a big impact. The other controllers I am using probably interface more immediately with their memory, but they are also running much more slowly (72 Mhz being the fastest) and I haven't had to resort to anything like DMA for them, so I'm hoping that since the AM3359 runs so much faster than that, I won't have to here either (although I would like to get familiar with the workings of that at some point, and as the complexity of the code grows and the demands on the system increase, I may have to).
Thanks! On Monday, June 15, 2015 at 5:48:46 PM UTC-4, Rick M wrote: > > > On Jun 15, 2015, at 07:33 , Bill M <[email protected] <javascript:>> > wrote: > > > > To Rick M, one of the things that attracted me to the BBB was that it > has several available UARTS, but I also need things to run in a > deterministic fashion since I need to control an array of servos and > updating needs to happen 128 times a second, which means a several dozen > byte packet going out that frequently. After reading through a bit more in > the TRM about the PRU UART, I don't think a PRU UART will be feasible since > it looks like they top out at around 300Kbs, and I need a megabit. I'm > hoping things will be sufficiently deterministic since I'm running bare > metal, and will drive the update loop with a timer interrupt and have the > UART just feed things out as fast as the line will consume it. I know > things will run more slowly if I don't use caching, but if I disable > caching, does that eliminate any pipelining? I'm a noob when it comes to > pipelining and caching, since I've only ever hacked on AVR microcontrollers > and a Cortex M3, where those weren't considerations. I'm a line of business > programmer in my day job :(. > > I'm not sure exactly what you're using the UART for. Are your servos > controlled via serial packets of some kind? Or are they typical hobby PWM > servos? If the latter, then I would have thought using a UART on the ARM > core (not the PRU) would be the best way to go. I'm assuming they can do a > megabit, although that probable requires DMA. > > It sounds like you're using the UART to communicate with the servo, and a > high rate. I can see why you'd want the timing to be right in that case. I > don't really have any idea what the caching effects are. > > Good luck! > > -- > Rick Mann > [email protected] <javascript:> > > > -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
