Porting GRBL to Zephyr


Hi all

I was wondering how to port some of the existing CNC suites to
Zephyr and I need your opinion on this. My idea was to take only (or
at least) g-code and stepper motor implementation from a project like
grbl, g2core (https://github.com/synthetos/g2) or Smoothieware
(https://github.com/Smoothieware/Smoothieware) and combine it with all
the goodies Zephyr has to offer, like USB support, disk access (SD
cards), FatFs, board abstraction and so on.

All of the projects mentioned above use a hardware timer (so far as my
analysis goes) which in it's ISR (whether when the timer overflows or
output compare event happens) performs some simple decisions which
motors to step and generates step pulses for those. This approach lets
them synchronize all the motors and achieve greater accuracy.

And so my main question arises : how to accomplish this in Zephyr. To
my knowledge there is no user space hardware timer API other than for
generating PWM. I have seen some PR's that aimed at implementing this
(I cannot find them now), but couldn't this be done using existing
APIs somehow? PS. We are talking about frequencies like at least 30kHz
but preferably higher and the number of motors is at least 3.


Join users@lists.zephyrproject.org to automatically receive all group messages.