On 10/13/16, Erik Friesen <[email protected]> wrote: > To clarify my question, I am trying to understand at what level lcnc > accesses hardware peripherals. For example, suppose I build a board with > an spi dac peripheral to the arm, as well as write the kernel driver, if > necessary. What type of glue do I need to provide in this situation? > Fear off the is an ARM Cortex A and also a Cortex M. The "A" type is what is inside your phone and what powers the Rasberry Piand Beagle Bone. These typically run a UNIX-like OS. Either Linux or in the case of Apple actually UNIX. They are not much different from the the PC based Linux systems we all know about.
The trend is to have very simple and general kernel level device drives that do little more than moderate access to the hardware. Then there is a user space library that handles protocol The prime example is USB hardware. This is the same on Linux ARM and Linus PC. The ARM does have a LOT more peripheral hardware built-in and the details expand on the chip. They are all different. TheCortex M is more like the Arduino then Pi. The M rarely runs an operating system and the software burned into flash and from an end user's level the software never change. You see the Arm Cortex M inside things like inkjet printers and microwave ovens and the like. For sophisticated motion control you really need both. (my internet is in robots, no as much CNC) One to run an OS and drive a user interface and screen and talk over a network and so on. and a smaller processor to make I/O lines go up and down and drive motors and read encoders. In LinuxCNC we sometimes have two processors a PC and a Mesa card. On an ARM based CNC, I think you'd see an "A" type perhaps it is a Raspberry Pi or perhaps it is an iPhone app. Then you'd have "M" types physically driving the hardware. The A types ARMs will act pretty much like PCs to an end user or casual programmer and the "M" typically uses a library that "hides" the fact that ll the chips are different. I can simply read "analog pin 1" and don't need to know the details. This means my code runs on many different ARMs with no or little change. In the Cortex M there is no "driver" level there is only user space. (or we can claim that it is all driver and there is no user.) I currently have serval small "M" type in my desk in the space between the keyboard and my monitor that I am typing o program. They are cheap as dirt, like $4 and less but I can easy keep upgrading an encoder with 64 pulses per rev that issuing 12,000 RPM. I can run four PID loops for four motors and if I know more about control theory if would not oscillate. But an"M" is cheap enough and small enough and uses such little amount of power that I can use one for each motor. One could use an FPGA (like Mesa) but the ARM cortex M is now so darn fast and cheap and VERY easy to program that I'd use that. Just for scale, if my motor runs at 12,000 rpm the "M" chips I have can execute as many as 500,000 instructions for each revolution of the motor. -- Chris Albertson Redondo Beach, California ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
