scottalford75 / Remora-RT1052

Remora firmware for Novusun RT1052 Ethernet CNC controller boards
GNU General Public License v2.0
16 stars 3 forks source link

NVEM v5 - Current Status/HOWTO #13

Closed otwieracz closed 1 year ago

otwieracz commented 1 year ago

Hey,

I recently purchased NVEM v5 with hopes of getting it to work with LinuxCNC via Remora. But after spending whole day going through LinuxCNC forum, trying every combination of hardware and software I was not able to achieve anything I am ready to give up.

But before I do, if possible, are you able to sum up:

So far I tried:

Flash NVEM v5 using ST-Link v2

Try to flash ST-Link with CMSIS-DAP firmware

Try to flash ST-Link with now-removed-from-git DSP firmware

--

In any case - thank you for your work!

scottalford75 commented 1 year ago

Hi, I see you are using the older firmware. The new C++ version is the actively developed version now.

https://github.com/scottalford75/Remora-RT1052-cpp

For flashing, CMSIS-DAP probes have proven to be the most reliable with pyOCD. CMSIS-DAP converted ST-Link or a PicoProbe is the way to go.

https://forum.linuxcnc.org/18-computer/44828-remora-ethernet-nvem-cnc-board?start=970#275842

otwieracz commented 1 year ago
$ pyocd flash remora-rt1052-1.1.0.bin --target mimxrt1050_quadspi
0000540 I Loading /Users/slawekgonet/Projects/cnc-router-eg/nvem/Remora-RT1052-cpp/Firmware/remora-rt1052-1.1.0.bin [load_cmd]
[==================================================] 100%
0082821 I Erased 327680 bytes (5 sectors), programmed 321536 bytes (1256 pages), skipped 0 bytes (0 pages) at 3.82 kB/s [loader]

Thank you!

otwieracz commented 1 year ago

@scottalford75 I managed to get my NVEM v5 (ethernet variant) flashed and got it talking to LinuxCNC machine.

Is there a HOWTO/quick start/documentation somewhere? I am lost a bit with various repositories, not sure where to start with my board.

otwieracz commented 1 year ago

Unfortunately, after trying to follow: https://www.forum.linuxcnc.org/18-computer/44828-remora-ethernet-nvem-cnc-board?start=130#240435

linuxcnc@linuxcnc:~/Remora/LinuxCNC/ConfigSamples/remora-nvem$ python3 -m venv venv
(venv) linuxcnc@linuxcnc:~/Remora/LinuxCNC/ConfigSamples/remora-nvem$ sudo apt install python3-dev python3-wheel
(venv) linuxcnc@linuxcnc:~/Remora/LinuxCNC/ConfigSamples/remora-nvem$ pip install wheel
(venv) linuxcnc@linuxcnc:~/Remora/LinuxCNC/ConfigSamples/remora-nvem$ pip install tftpy
$ python3 upload_config.py config.txt
Valid JSON config file, uploading to NVEM board
Config file length (words) = 1775
Config file length (bytes) = 7099
Remainder = 3
Padding added =  [0]
Config file length with padding (bytes) = 7100
CRC-32 = 0x95ee3542

My board is no longer responding on 10.10.10.10. Re-flashing the firmware also did not help:

(venv) slawekgonet@MacBook-Pro ~/Projects/cnc-router-eg/nvem/Remora-RT1052-cpp/Firmware (main?) $ pyocd flash remora-rt1052-1.1.0.bin --target mimxrt1050_quadspi
0000804 I Loading /Users/slawekgonet/Projects/cnc-router-eg/nvem/Remora-RT1052-cpp/Firmware/remora-rt1052-1.1.0.bin [load_cmd]
[==================================================] 100%
0031278 I Erased 0 bytes (0 sectors), programmed 0 bytes (0 pages), skipped 321536 bytes (1256 pages) at 10.30 kB/s [loader]

Is it dead? :)

otwieracz commented 1 year ago

Managed to clear it and re-flash:

$ pyocd erase --chip --target mimxrt1050_quadspi
0000628 I Erasing chip... [eraser]
0010539 I Chip erase complete [eraser]
0010546 E Error during board uninit: [session]
(venv) slawekgonet@MacBook-Pro ~/Projects/cnc-router-eg/nvem/Remora-RT1052-cpp/Firmware (main?) $ pyocd flash remora-rt1052-1.1.0.bin --target mimxrt1050_quadspi
0000551 I Loading /Users/slawekgonet/Projects/cnc-router-eg/nvem/Remora-RT1052-cpp/Firmware/remora-rt1052-1.1.0.bin [load_cmd]
[==================================================] 100%
0082812 I Erased 327680 bytes (5 sectors), programmed 321536 bytes (1256 pages), skipped 0 bytes (0 pages) at 3.82 kB/s [loader]

Then loaded nvem-rt1052.txt config:

(venv) slawekgonet@MacBook-Pro ~/Projects/cnc-router-eg/nvem/Remora-RT1052-cpp/LinuxCNC (main?) $ python3 remora-rt1052-basic/upload_config.py nvem-rt1052.txt
Valid JSON config file, uploading to board
Config file length (words) = 1702
Config file length (bytes) = 6805
Remainder = 1
Padding added =  [0, 0, 0]
Config file length with padding (bytes) = 6808
CRC-32 = 0xf73bb8c1

Now it is alive, haven't connected motors yet but quick check with oscilloscope shows some action on STEP pins. Issues I am facing immediately: