Remora for RP2040

More
7 months 2 days ago #344968 by scotta
Replied by scotta on topic Remora for RP2040
Hi eraserhd,

Thanks for debugging this. I've not worked on the RP2040 for some time. This Remora port was a hotel room project when I was travelling for work.

I'd be interested to see a pull request to merge your work. If you have time you might also look to update the stepgen to send back the raw count like the recent Remora code for STMs, that way the latest Remora Linuxcnc component could be used.
The following user(s) said Thank You: tommylight

Please Log in or Create an account to join the conversation.

More
7 months 2 days ago #344972 by eraserhd
Replied by eraserhd on topic Remora for RP2040
At this point, I've diverged quite a bit. I'm willing to do the work to separate it out, but do you want a big ugly PR or a stack of single-topic ones? I would start with a noop that makes indentation consistent (prefer 4 spaces, but 1 tab also works).

I'm also adding support for the new W55RP20 ( docs.wiznet.io/Product/Chip/MCU/W55RP20/w55rp20-evb-pico ), which has the W5500 on different GPIO and also conflicts with the example config.  I also bought a RP2350 version to play with.
The following user(s) said Thank You: tommylight

Please Log in or Create an account to join the conversation.

More
7 months 2 days ago #344973 by eraserhd
Replied by eraserhd on topic Remora for RP2040
Also, unless I'm missing something, it's already sending back the raw count?

Please Log in or Create an account to join the conversation.

More
6 months 3 weeks ago #345196 by 3404gerber
Replied by 3404gerber on topic Remora for RP2040
Hi eraserhd,

Thank you for your answer. I'd like to hear more about that spinlock var; I'm a noob in coding but willing to learn. :) I quickly checked your repo and saw that you changed tons of things. I didn't go into the details but will get into the code and test it soon.

On my side, found out that it works stable if I don't use the base thread. And as I'm currently trying to work with TMC5160 in full SPI (with the driver internal step generator), I can live with the servo thread only.

Please Log in or Create an account to join the conversation.

More
6 months 3 weeks ago #345281 by eraserhd
Replied by eraserhd on topic Remora for RP2040
I didn't make a fix for the spinlock var because restructuring the code to try and implement PIO eliminated it. I'm still working on the PIO code, but "semaphore" needs a "volatile" keyword in front of it:

github.com/scottalford75/Remora-RP2040-W...read/pruThread.h#L31

I don't remember if "execute" also needs it. "semaphore" is intentionally used to synchronize the two CPU cores, so you need to tell the compiler the value can change any time you look at it.

Please Log in or Create an account to join the conversation.

More
5 months 2 weeks ago #346348 by eraserhd
Replied by eraserhd on topic Remora for RP2040
github.com/scottalford75/Remora-RP2040-W5500/pull/15

I haven't solved PIO yet (I went down a path that was interesting but did not work), but this PR allows stepping a little faster (50KHz), but also allows a lot more precision in step pulse generation and configuration of steplen, stepspace, dirhold, dirsetup, and dirdelay on the RP2040.

It also documents my future idea about PIO. I know how to make it work now and hope to get to it soon.

Please Log in or Create an account to join the conversation.

Time to create page: 0.192 seconds
Powered by Kunena Forum