LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)

More
2 years 2 months ago #307314 by Mecanix
@meister

Similarly, I can't make the stepper work. This is NOT a good start for me man, ouchy lol

The dir works on all axis, however getting no pulse from any of them. Can you also share a stepgen config for an axis? Below is what I've blindly attempted, but getting nowhere (as usual!!). 
Code:
        {             "type": "stepdir",             "pins": {                 "step": {                     "pin": "13"                 },                 "dir": {                     "pin": "14"                 }             },             "is_joint": true,             "axis": "X",             "signals": {                 "velocity": {                     "net": "joint.0.vel-cmd"                 },                 "position": {                     "net": "joint.0.motor-pos-fb"                 }             }         },

Please Log in to join the conversation.

More
2 years 2 months ago #307316 by meister
joints need no signal config
Code:
        {             "type": "stepdir",             "pins": {                 "step": {                     "pin": "13"                 },                 "dir": {                     "pin": "14"                 }             },             "is_joint": true,             "axis": "X"         },

EDIT: better using the rio-setup tool
even i now have problems doing this in pure json :)

Please Log in to join the conversation.

More
2 years 2 months ago #307317 by meister

Please Log in to join the conversation.

More
2 years 2 months ago #307318 by Mecanix
Wow. I didn't get a pulse on any axis with the original config, that's why I tried with the signals. Neither config pulses. Snap, now what.

Pulse PIN is always HIGH. Dir pin works fine though!

Can you show a functional HAL file with a functional step/dir stepper config? I'll compare it to mine and see what's not updating in mine.

Please Log in to join the conversation.

More
2 years 2 months ago #307319 by meister
all flashed ? halcompile ?

check it in rio-test gui (do not forget the enable checkbox)

i'm not at home, so i can not test a config and send you, but it should work :(

Please Log in to join the conversation.

More
2 years 2 months ago #307323 by Mecanix
Ah man no rush, you're too kind for real. I'm so not making thousand-dollar parts, just testing this gowin pinouts and timings, and so nothing to worry about.

Yeah gateware flashed, LinuxCNC files overwritten and halcomp'd, everything routine after each generate.

I'll play around with it. Obviously something I'm doing wrong. I'll update if I get anywhere.

Please Log in to join the conversation.

More
2 years 2 months ago #307325 by meister
i had done a major update, but i just compared one with an old version and everything looks good.
Unfortunately I can't tell you what the problem might be at the moment :(

Please Log in to join the conversation.

More
2 years 2 months ago #307327 by Mecanix
PIN 13 (x_pulse) is NOT working on my FPGA. w t f

If I swap pins and place the step on PIN 14, I'm getting steps (!!). Told you the problem was at my end, but I'll have to keep you responsible for this one - guilty!! You picked those random pins ;)

In all seriousness, something's not right with PIN13. Let's hope it's just hardware (bad soldering) and not gowin's internals or their place/routing compiler. Yikes. See? That's why I wanted to test ALL PINS on that thing before sending out some PCB work... don't trust - verify!

Please Log in to join the conversation.

More
2 years 2 months ago #307328 by meister
if you are playing around anyway, you can also set the enable bits of the stepdir instances to 1 in rio.v
Code:
assign PINOUT_STEPDIR11_STEP = PINOUT_STEPDIR11_STEP_RAW; assign PINOUT_STEPDIR11_DIR = PINOUT_STEPDIR11_DIR_RAW; wire PINOUT_STEPDIR11_STEP_RAW; wire PINOUT_STEPDIR11_DIR_RAW; wire UNUSED_PIN_STEPDIR11_EN; stepdir stepdir11 ( .clk(sysclk), .step(PINOUT_STEPDIR11_STEP_RAW), .dir(PINOUT_STEPDIR11_DIR_RAW), .en(UNUSED_PIN_STEPDIR11_EN), .velocity(VAROUT32_STEPDIR11_VELOCITY), .enable(1), .position(VARIN32_STEPDIR11_POSITION) );

but if that works, something is wrong with the connection and the board is in ERROR state

Please Log in to join the conversation.

More
2 years 2 months ago #307340 by Mecanix
Quick update:

Changed all the pinouts to the ones that works. So far PIN13 and PIN15 are persistently HIGH. As if they were physically shorted but they aren't (good soldering). Just putting this out there, to be aware.

So far got stepgen, spindle pwm, spindle encoder & index, and home switches. [TESTED]. Everything that makes up for the essentials!! Super happy about that.

Those screwed-up pins are discouraging me though. But I'm not coming down to any cynical conclusion yet. I'll have a look in their datasheet again and see if I can find any reason for those being HIGH on crack...

Please Log in to join the conversation.

Time to create page: 0.372 seconds
Powered by Kunena Forum