Settings not pushing to machine?

but the maslow needs to do the kinematics calculations while Marlin is working
with nice orthoginal math. Take a look at what the maslow needs to calculate
some time, it’s ugly

You are correct, currently they are calculated in an interrupt. I was trying to
take a step back and specify requirements for different calculations.

I don’t think that FreeRTOS is the best solution here. It is currently implemented by using the WDT which limits its fidelity to 15ms as I recall. I am looking at some other options, that I think are viable, but need to research further.

The general issue is that none of the current code that shares resources (memory, buffers, variables, access to motors or encoders) is atomic. Anything running from within loop() can be preempted by an ISR and since we have calcs being computed within an ISR, there is a good chance for clobbering of data within any of those resources by non-atomic code.

The overhead of an RTOS is not as bulky as you might think. There are several that I think are suited for exactly what Maslow is doing, and will offer data & resource protection, execution priority and several other benefits. It will just take some time to architect and port properly.

If only the kids didn’t need to eat, all of my projects would be done!

I also have the limitations of only having the arduino in hand… no motors or encoders yet, so other folks are necessary for testing end-to-end, until Sept\Oct… though simulation can go a long way, at least at inception.

Stay tuned, more to come.

1 Like