If you are looking for a small uP to use as a real-time controller, today
in 2017 its the ARM cortex M. The range is wide enough that you can find
one to suit. At the low end there is nothing to be gained by going with
say, Atmel AVR or some other 8-bit chip and at the high end are some 32-bit
200MHz chips.
Cortex M does not run Linux and that is the good thing if doing real-time.
But still I'd NEVER write to the "bare metal". Not only is that very time
consuming but then your code is forever tried to one specific chip. In
stead choose a good RTOS to run on the Cortex M. This will come with a
very light weight hardware abstraction that will let you do things like
connect a timer output to a specific pin in a portable way
Yes you can work with only one loop to task but many times your work is
made easier and you introduce fewer bugs if you divide the job into
multiple tasks. For example monitoring limit switches while generating
pluses and at the same time reading commands over a serial link and also
maybe even writing to a debug log file that lives on an SD card.
On my robot platforms I have 4 or 6 wheels each driven with a DC servo
motor from a LiPo battery. The Cortex M gets commands from a Linux
powered Pi3. The commands are in the form of translation and rotation
vectors. The ARM M converts this to motor currents for each motor and
reads the motor encoders and create PWM for the motor h-bridge controllers.
I'm using an RTOS and writing in C++. The M4 under an RTOS is fast
enough to run 4 PID loops, generate PWM and service 11,000 interrupts per
second from four quadrature encoders and also read a 9-axis IMU, update a
small LCD status display and write to the debug log.
I have several different ARM M boards some M3 and some M4 from low to high
end from a couple different manufactures and the code moves between boards
I learned long ago that portability is impotent. Suppliers change their
product and you want to be able to take advantage of newer advances in uP
as they come out.
On Tue, Jun 13, 2017 at 8:31 AM, Nicklas Karlsson <
Post by Gene HeskettPost by Bertho StultiensPost by Nicklas KarlssonMaybe there is no need for a linux kernel. Have you read the manual
for the
Post by Bertho StultiensPost by Nicklas KarlssonARM CPU? Or what kind of CPU is it?
RPI3 uses a quad-core ARMv8 (Cortex-A53) with all kinds of bells and
whistles. Have you read the manual for that core?
No and I did not read the manual for the smaller cortex-m* cores either
even though I use them daily.
Post by Bertho StultiensI've been using many of those small ARM cores (M0...M4) from different
manufacturers and each is about a 1000 pages. The core in the RPI is
utterly more complex.
I have only read manual for a few of the peripherals I use and that's enough.
Post by Bertho StultiensBut, if that is not enough, there are so many internal and external
peripherals that you need to go through all other documentation too.
Designing and writing a bare-bone OS is an uphill battle and you do not
want to do that if there is no /extremely/ specific need.
Linux provides an infrastructure that is very hard to write yourself,
like file-system, network, process- and memory-management to name a few.
Just consider the amount of dev-time that is put into Linux.
In no doubt there are plenty of infra structure and if the infrastructure
is needed there are not much choice. I think there is need for only one
task and have been looking on some of the smaller micro controllers.
------------------------------------------------------------
------------------
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
https://lists.sourceforge.net/lists/listinfo/emc-users
--
Chris Albertson
Redondo Beach, California