scottalford75 / Remora-RP2040-W5500

Remora firmware for RP2040 with W5500 Ethernet
5 stars 8 forks source link

questions #6

Closed jschoch closed 1 year ago

jschoch commented 1 year ago

Hey Scott,

Got around to poking at this again this weekend but a few problems.

  1. using the current main I can't ping the pico, tried about everything. Have you tried this out with a rpi4 by chance? I've tried 2 different w5500 breakouts, i'm not using the pico hat. I've tested with the pico-examples code and it works and can be pinged. you code doesn't really look anything like that example so i'm a bit lost as to why they are different.
  2. using commit b61dc51da4af34d2699614ff8f5590c7ae014cd5 i can ping the pico but it just does this and locks up
Make Digital Input at pin GP13

Creating a std module
Creating Pin @
  pin = GP13
ptrData = 0

## Entering START state

Starting the BASE thread
Registering interrupt for interrupt number = 0
    setting up timer on PWM Slice 0
    desired frequency = 40000, div = 1, wrap = 3124
    actual frequency  = 40000.0000
        timer started

Starting the SERVO thread
Registering interrupt for interrupt number = 1
    setting up timer on PWM Slice 1
    desired frequency = 200, div = 16, wrap = 39061
    actual frequency  = 200.0000
        timer started

## Entering IDLE state

## Entering RUNNING state

## Entering RESET state
   Resetting rxBuffer

## Entering IDLE state

then it stops responding to pings and I have to reset it.

  1. I had to monkey with the uart setttings and I can only seem to get my FTDI to read GPIO28, nothing over USB and can't connect to that serial port. wondering how you are debugging.

  2. which hal module goes with this main version? I'm trying the remora-eth but there is also remora-nv and likely many versions. Maybe this deserves it's own repo with tags to track what it is tested with/designed to work with.

scottalford75 commented 1 year ago

Hi, we increased the SPI speed to the W5500 module as it is onboard on the development board and the PicoBOB-DLX. This may be an issue when using an external module.

This is the line that was changed. Maybe compare to your working example.

https://github.com/scottalford75/Remora-RP2040-W5500/blob/9ff31af100d31f97e95ae29b67da57f6c258ed4a/port/ioLibrary_Driver/src/w5x00_spi.c#L141

jschoch commented 1 year ago

With this change

 spi_init(SPI_PORT, 10000 * 1000);

I can ping it now and try to take it out of estop but it still hangs.

What version/repo of the linux hal module should I be testing with?

scottalford75 commented 1 year ago

The Ethernet component is remora-nv.c

On Wed, Oct 11, 2023 at 10:42 AM Jesse Schoch @.***> wrote:

With this change

spi_init(SPI_PORT, 10000 * 1000);

I can ping it now and try to take it out of estop but it still hangs.

What version/repo of the linux hal module should I be testing with?

— Reply to this email directly, view it on GitHub https://github.com/scottalford75/Remora-RP2040-W5500/issues/6#issuecomment-1756469522, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGBMVIIRNEZRSONWG34SRSLX6XMMTAVCNFSM6AAAAAA5ZQXYGKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJWGQ3DSNJSGI . You are receiving this because you commented.Message ID: @.***>

jschoch commented 1 year ago

which repo can I find the right working version, [scottalford75/Remora-NVEM or scottalford75/Remora-EC500?

scottalford75 commented 1 year ago

https://github.com/scottalford75/Remora-NVEM/tree/main/LinuxCNC/Components/Remora-nv

On Wed, Oct 11, 2023 at 10:44 AM Jesse Schoch @.***> wrote:

which repo can I find the right working version, [scottalford75/Remora-NVEM or scottalford75/Remora-EC500?

— Reply to this email directly, view it on GitHub https://github.com/scottalford75/Remora-RP2040-W5500/issues/6#issuecomment-1756471306, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGBMVIOFYLQVHHDQ3L2S6WLX6XMXRAVCNFSM6AAAAAA5ZQXYGKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJWGQ3TCMZQGY . You are receiving this because you commented.Message ID: @.***>

jschoch commented 1 year ago

ugh, still getting issues after the initial connection

...
Starting the SERVO thread
Registering interrupt for interrupt number = 1
    setting up timer Slice 1
    actual period = 500
        timer started

## Entering IDLE state

## Entering RUNNING state
No Data max triggered, setting comms status to false, max was: 40 Comms returned false, entering Reset
## Entering RESET state
   Resetting rxBuffer

## Entering IDLE state

then it locks up and doesn't respond to ping or any further estop signal.

jschoch commented 1 year ago

a video to show where i'm stuck after a few more hours troubleshooting

https://youtu.be/PjC4UyQP5XM

would be great if you could join the linuxcnc discord https://discord.gg/bQhs5mzp

jschoch commented 1 year ago

ok.... my luck... i finally got a debugger attached and ran

cmake -DCMAKE_BUILD_TYPE=Debug . -DPICO_BOARD=pico
make clean
make

and it is working. I also had a breakout board

image

THis may have played a part but i disconnected everything and was still having the issues until i loaded the debug version.

Now i'm getting joint errors with the old defaultConfig.

jschoch commented 1 year ago

i had slowed down the servo period in the ini for troubleshooting, set it back and joint errors went away. I'll close this and try to document setup better in the PR.