Remora - Rpi Software Stepping Using External Microcontroller via SPI

More
5 years 5 months ago #209957 by cakeslob
Ok, so I just copy it (firmware.bin) using an sd card reader, or is there a flashing process Im oblivious to? Just filebrowser copy/paste? The version I have is a regular 1.4 no turbo with a 1768 chip, so I load the 1768 firmware right? Cable is made and ready to go, even copied colours to avoid any confusion. The config.txt, I still also just load this on sd root with file browser? and so Im understanding fully, the 1768/1769 firmware is the remora firmware with all modules, and the config.txt is for the different pinout/module options? Both of which I put on the sd card?

Also, the halcompile of remora is a symlink to what ever directory I installed it from? so where ever I installed remora from (linuxcnc/remora) it has to stay there, correct?

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

More
5 years 5 months ago #209958 by scotta
Yes, a simple copy paste onto the SD card.

The following command will compile and install the component into the correct location for your system.

pi@raspberry:~ $ sudo halcompile --install remora.c

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

More
5 years 5 months ago #209964 by alkabal
Hi

Great job you have done and share, many thanks for comunity !

Any plan to use ethernet for replace spi ?

Br

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

More
5 years 5 months ago #209994 by scotta

alkabal wrote: Hi

Great job you have done and share, many thanks for comunity !

Any plan to use ethernet for replace spi ?

Br


I've got a W5500 ethernet module sitting on the bench. Just no experience with ethernet and UDP and the best way to setup on the firmware site. The SPI running under DMA has nearly zero cpu overhead whereas ethernet comms would come with some overhead.

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

More
5 years 5 months ago #210131 by cakeslob
Ok, Im getting this error Linuxcnc side when I try to get out of estop
Code:
Bad SPI payload = 0
sometimes
Code:
Bad SPI payload = ffffffff

This is what I get from UART
Code:
Remora PRU - Programmable Realtime Unit ## Entering SETUP state 1. Reading json configuration file Mounting the filesystem... OK Opening "/fs/config.txt"... OK Json config file lenght = 2381 Closing "/fs/config.txt"... 2. Setting up DMA and threads Creating thread 40000 Creating thread 1000 3. ParsiConfig deserialisation - Deserialization succeeded Servo thread object Reset pin Make Reset Pinule Creating Pin @ portNumber = 1 pin = 31 Base thread object X - Joint 0 step generator Creating a std module Creating Pin @ portNumber = 2 pin = 1 Creating Pin @ portNumber = 2 pin = 2 Creating Pin @ portNumber = 2 pin = 6 Base thread r Creating a std module Creating Pin @ portNumber = 2 pin = 8 Creating Pin @ portNumber = 0 pin = 19 Creating Pin @ portNumber = 0 pin = 20 Base thread object Z - Joint 2 step generator Creating a std module Creating Pin @ portNumber = 0 pin = 21 Creating Pin @ portNumber = 0 pin = 22 Creating Pin @ portNumber = 2 pin = 11 Base thread object E0 - Joint 3 step generator Creating a std module Creating Pin @ portNumber = 2 pin = 12 Creating Pin @ portNumber = 2 pin = 13 Creating Pin @ portNumber = 0 pin = 11 Servo thread object Make Temperature measurement object Extruder tenperature sensor Creating a slower module, updating every 1000 thread cycles Creating Thermistor Tempearture measurement @ pin 0.23 Creating Pin @ portNumber = 0 pin = 23 Temperature sensor error, pin 0.23 reading = -273.15 Temperature sensor error, pin 0.23 reading = -86.8344 Start temperature = -86.8344 Base thread object RC servo for probe Make RC Servo at pin 2.0 Creating a slower module, updating every 4000 thread cycles Creating RC servo at pin 2.0 Creating Pin @ portNumber = 2 pin = 0 Base thread object Encoder Creating Quadrature Encoder at pins 1.20 and 1.22 Encoder has index at pin 8 Creating a std module Creating Pin @ portNumber = 1 pin = 20 Creating Pin @ portNumber = 1 pin = 22 Creating Pin @ portNumber = 8 Servo thread object X min Make Digital Input at pin 1.29 Creating a std module Creating Pin @ portNumber = 1 pin = 29 Servo thread object X max Make Digital Input at pin 1.28 Creating a std module Creating Pin @ portNumber = 1 pin = 28 Servo thread object Y min Make Digital Input at pin 1.27 Creating a std module Creating Pin @ portNumber = 1 pin = 27 Servo thread object Y max Make Digital Input at pin 1.26 Creating a std module Creating Pin @ portNumber = 1 pin = 26 Servo thread object Z min Make Digital Input at pin 1.25 Creating a std module Creating Pin @ portNumber = 1 pin = 25 Servo thread object Z max Make Digital Input at pin 1.24 Creating a std module Creating Pin @ portNumber = 1 pin = 24 Servo thread object Extruder fan switch Make Switch (On) at pin 0.0 Creating a std module Creating a Switch @ pin 0.0 Creating Pin @ portNumber = 0 pin = 0 ## Entering START state Starting the BASE thread Registering interrupt for interrupt number = 1 power on timer timer set MCR timer set PR timer set PRO timer start ++ MbedOS Fault Handler ++ FaultType: HardFault Context: R0 : 10003C00 R1 : AA3DE7CC R2 : 00000016 R3 : FEFFC713 R4 : 10003B78 R5 : 00000068 R6 : 00000001 R7 : 00000000 R8 : 00000000 R9 : 200801E0 R10 : 20081324 R11 : 00000006 R12 : 00C80000 SP : 10007F80 LR : 00010995 PC : 0000FE8E xPSR : 21000011 PSP : C1688394 MSP : 10007F60 CPUID: 412FC230 HFSR : 40000000 MMFSR: 00000000 BFSR : 00000082 UFSR : 00000000 DFSR : 00000000 AFSR : 00000000 BFAR : AA3DE7E0 Mode : Handler Priv : Privileged Stack: MSP -- MbedOS Fault Handler --


Cable is 4in long. Copied exactly the same as manual, even colour.
Config is remora-xyz sample config
Board is skr v1.4 , with lcp1768
Loaded firmware lcp1768 firmware.bin to the root of sd
Loaded skr1.3 config.txt to root of sd

How can I diagnose this?
Ive done this from the github, but dont know where to go now.
Code:
Remora running now on RPi 4 without issues! The SPI clock is provided by the GPU so adding gpu_freq=200 into /boot/config.txt did the trick. I'll update the docs.

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

More
5 years 5 months ago #210135 by scotta
The hard fault output at the bottom points to a configuration error. And my guess is its the encoder. This is the error "Encoder has index at pin 8". This is not a valid port and pin assignment. And you will see that the pin is not created properly at the bottom. If you do not need the encoder remove it from the config.txt and see what happens.

Base thread object
Encoder
Creating Quadrature Encoder at pins 1.20 and 1.22
Encoder has index at pin 8

Creating a std module
Creating Pin @
portNumber = 1
pin = 20
Creating Pin @
portNumber = 1
pin = 22
Creating Pin @
portNumber = 8

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

Time to create page: 0.589 seconds
Powered by Kunena Forum