Welcome! Log In Create A New Profile

Advanced

RepRapFirmware 3.0 port for LPC1768/9 based boards

Posted by sdavi 
Re: RepRapFirmware 3.0 port for LPC1768/9 based boards
May 16, 2020 06:00PM
@jay_s new version that will try and connect to the access point that has the strongest signal strength (using the BSSID). New link (to the same filename!): [drive.google.com]
Should produce some debug of what it is doing so please post the details when you get chance to run it. Oh and I've also modified things so that when you are connected and do an M122 the Mac address displayed is BSSID of the access point, which may help you check if the connection is to the correct one.
Re: RepRapFirmware 3.0 port for LPC1768/9 based boards
May 16, 2020 06:17PM
@jay_s, ah good that makes sense. No rush just let me know how you get on.
Re: RepRapFirmware 3.0 port for LPC1768/9 based boards
May 17, 2020 12:56AM
Quote
DrDitto
Thanks to all.
I will make a deep research.
At the moment I will work changing the new Open source mks tft firmware. Because the one that all mention at the messages did not work. It shows no images for the button.

You could also run the original TFT firmware (configured to use Marlin mode) and setting the aux serial in RRF to use "raw" mode with M575 in the config.g (i.e. M575 P1 B115200 S2).

Edited 1 time(s). Last edit at 05/17/2020 12:57AM by sdavi.
Re: RepRapFirmware 3.0 port for LPC1768/9 based boards
May 17, 2020 03:40AM
@gloomyandy

That works.
I kept resetting the nodemcu and every once in a while it wouldn't see the nearest wifi router at all so would connect to the one further away.
But when it saw the closer one it would always pick that.
Is there any way you could increase the time is scans for just a smidge?

On another note, would you be up for building a version without the LPC specific changes? I.e. for an original duet?


Based in Darlington, North East
Re: RepRapFirmware 3.0 port for LPC1768/9 based boards
May 17, 2020 05:25AM
Hi Jay,
I think I can probably do all of those things, but I need to decide which SDK to use (as they are different in a few places). Can you try this version: [drive.google.com]

It is the same as the one you have been trying, but built with the V3.XX SDK. I'd rather use that version if I can.
Re: RepRapFirmware 3.0 port for LPC1768/9 based boards
May 17, 2020 06:25AM
@gloomyandy

This version functions the same as the previous one.
i.e. it connects to the strongest signal and sametimes doesn't see the closest one (although this only happened once).
There does seem to be a large variance in the number of access points it finds on each reboot. Least I've had is 3, most is 12 all in a matter of a couple of minutes.
So version 3 of the SDK seems to be the one to go for.

BTW, I have a duet 2 wifi as well now hence asking about a duet version.
Its currently sat on the bench so is available for any and all testing.


Based in Darlington, North East
PCR
Re: RepRapFirmware 3.0 port for LPC1768/9 based boards
May 17, 2020 06:27AM
Re: RepRapFirmware 3.0 port for LPC1768/9 based boards
May 17, 2020 11:28AM
@gloomyandy

had a go running the v3 SDK version you posted above on an original duet 2 wifi and it worked correctly as expected.
I did get one error stating
WiFi reported error: socket number out of range

But I'm sure that's probably linked the LPC specific changes.


Based in Darlington, North East
Re: RepRapFirmware 3.0 port for LPC1768/9 based boards
May 17, 2020 12:37PM
Yes that error is probably expected as one of the changes is to reduce the number of available sockets to match the LPC configuration. I'll hopefully build a Duet version later this evening.
PCR
Re: RepRapFirmware 3.0 port for LPC1768/9 based boards
May 17, 2020 02:51PM
FYI:

I ordered some Pi to Skr Boards too. Only one 10 pin idc cable needed!
Best
Re: RepRapFirmware 3.0 port for LPC1768/9 based boards
May 17, 2020 02:53PM
@PCR

Have you done it as a little hat for the Pi? And then just the 10 pin to 10 pin cable between the two?


Based in Darlington, North East
PCR
Re: RepRapFirmware 3.0 port for LPC1768/9 based boards
May 17, 2020 02:58PM
Yes
Re: RepRapFirmware 3.0 port for LPC1768/9 based boards
May 17, 2020 03:08PM
Hi good afternoon from Costa Rica
I am reviewind the code of RRF LPC port
And I need to ask something.
I saw that the esp8266 WIFI uses SPI related with extarnalsdcard.
I tehre any way to remap tyhe spi channels to have SPI0 for the lcd and spi1 for the WIFI? This could allow us to have both at he same time.
At the same tie I sae P0.5, P4.28 and P0.4 (MISO,MOSI,SCK)
Could those pins allow me to have both 12864 without sd and the 8266 at same time?

Edited 1 time(s). Last edit at 05/17/2020 03:21PM by DrDitto.
Re: RepRapFirmware 3.0 port for LPC1768/9 based boards
May 17, 2020 03:20PM
@DrDitto

You need to have an internal SD card to be able to configure the pins and that requires an SPI channel.
Why would you want an external SD card?
You could edit the firmware to use the pins you require I suppose


Based in Darlington, North East
Re: RepRapFirmware 3.0 port for LPC1768/9 based boards
May 17, 2020 03:24PM
Ok
The problem was puerly retaed with the fact that LPC17xxhas just 2 spi channels?
Re: RepRapFirmware 3.0 port for LPC1768/9 based boards
May 17, 2020 03:25PM
Yes, it only has the two


Based in Darlington, North East
Re: RepRapFirmware 3.0 port for LPC1768/9 based boards
May 17, 2020 03:33PM
@DrDitto, it is not just a matter of remapping what spi device the software uses, most boards have spi1 connected directly to the internal SD card reader and do not make those pins available externally, which pretty much means that spi1 is not usable for any other purpose. On most boards spi0 is made available via the EXT1/EXT2 headers and is usually intended for use with an external SD card reader, but it does not have to be. Some boards also connect some of the spi0 pins to those used to control an external LCD others (like the SKR V1.3 and V1.4) do not route the spi0 pins to that part of the LCD header instead they just use general I/O pins and use software spi to talk to the LCD.

So if all you want to do is use an external LCD (but not an external SD card), then with boards like the SKR you can also use run the duet style ESP8266 wifi interface at the same time (though you will need to build some specific cables or an adaptor board to split out the signals). As I have already said, it would help if you described what it is you trying to achieve and what hardware you want to use, that way we can provide better information to you.
Re: RepRapFirmware 3.0 port for LPC1768/9 based boards
May 17, 2020 03:35PM
@PCR are you intending to provide any way to power the rPi from the LPC based board? You might want to consider the various power options. Most LPC boards do not have 5V regulator that can provide enough current for a rPi. On my adaptor board I use a buck converter to supply the rPi from the 12/24 main supply.
PCR
Re: RepRapFirmware 3.0 port for LPC1768/9 based boards
May 17, 2020 03:53PM
@gloomyandy.

For the version not. I am looking for a method to supply IT from the main supply. winking smiley I habe some ideas. Will Work on that this week!

Best
Re: RepRapFirmware 3.0 port for LPC1768/9 based boards
May 17, 2020 05:40PM
Thanks for your patience. And also for your help.
As I Said I am looking for a way to have access to the wifi Interface and a full lcd functions. Using the 12864 and the wifi server in a similar way that duet wifi does
Re: RepRapFirmware 3.0 port for LPC1768/9 based boards
May 17, 2020 05:59PM
@DrDitto Although you could get the hardware for this combination to work (but you would need to build some sort of adaptor board), the LPC does not have enough RAM to support any of the networking options and the 12864 menu system at the same time. If you want a local display you would be better off using either a TFT type controller or a PanelDue. I have no experience of using a TFT board with RRF but other users on the the forum have it working. The PanelDue works fine. Alternately you could use a rPi and attach a touch screen to that and get the full DWC interface on the local display.
Re: RepRapFirmware 3.0 port for LPC1768/9 based boards
May 17, 2020 07:04PM
Hi @gloomyandy

I set up your latest RRF3 Ethernet build on a genuine Smoothieboard and the network takes a long time to load up.

There are several different outcomes:
[1] First ever boot - router did not see board at all, I came back from lunch 30 minutes later and then my router finally showed that device and I got the webpage to finally load.
[2] Subsequent page loads/ refresh can still easily take over a minute to load the page. Then there will be a "Connecting" bar and connection will blip a few times before things settle down.
[3] Now, after a few refreshes, I just have the page name of "Duet Web Control 2" and an empty white webpage with no content. No more progress spinner.


This is just a basic machine configuration using the /sys files from Jay's configurator, and /www with DWC 3.1.0 (released 2 days ago), and the board is sitting on my desk and not hooked up to any printer/ components.

Here is an M122 from after [1]:

Attempting connection at \\.\COM8...
  Testing plaintext communication protocol...
READ: ok
  Connected to machine!
SENT: T0
READ: ok
SENT: M105
READ: ok T:-273.1 /0.0 T0:-273.1 /0.0
READ: Error: Temperature reading fault on heater 1: sensor open circuit
SENT: M122
READ: === Diagnostics ===
READ: RepRapFirmware for LPC176x based Boards (smoothieboard) version 3.1.0 running on LPC176x at 120Mhz
READ: Used output buffers: 2 of 16 (12 max)
READ: === RTOS ===
READ: Static ram: 3624
READ: Dynamic Memory (RTOS Heap 5): 3408 free, 1936 never used
READ: Exception stack ram used: 264
READ: Never used ram: 420
READ: Tasks: EMAC(blocked,52) NETWORK(ready,244) IP-task(blocked,88) HEAT(blocked,992) MAIN(running,1460) IDLE(ready,84)
READ: Owned mutexes:
READ: === Platform ===
READ: Last reset 00:08:16 ago, cause: [power up]
READ: Last software reset details not available
READ: Error status: 0
READ: Date/time: 2020-05-17 17:13:00
READ: Slowest loop: 4.99ms; fastest: 0.23ms
READ: === Storage ===
READ: Free file entries: 4
READ: SD card 0 detected
READ: SD card longest read time 1.7ms, write time 0.0ms, max retries 0
READ: === Move ===
READ: Hiccups: 0, FreeDm: 100, MinFreeDm: 100, MaxWait: 0ms
READ: Bed compensation in use: none, comp offset 0.000
READ: === DDARing ===
READ: Scheduled moves: 0, completed moves: 0, StepErrors: 0, LaErrors: 0, Underruns: 0, 0  CDDA state: -1
READ: === Heat ===
READ: Bed heaters = -1, chamberHeaters = -1
READ: === GCodes ===
READ: Segments left: 0
READ: Movement lock held by null
READ: HTTP is idle in state(s) 0
READ: File is idle in state(s) 0
READ: USB is ready with "M122" in state(s) 0
READ: Aux is idle in state(s) 0
READ: Trigger is idle in state(s) 0
READ: Queue is idle in state(s) 0
READ: LCD is idle in state(s) 0
READ: Daemon is idle in state(s) 0
READ: Autopause is idle in state(s) 0
READ: Code queue is empty.
READ: === Network ===
READ: Slowest loop: 3.55ms; fastest: 0.01ms
READ: Responder states: HTTP(0) HTTP(0)
READ: HTTP sessions: 1 of 2
READ: Interface state: active, link 10Mbps half duplex
READ: Socket States: Listening  Listening  
READ: EthDrv: Dropped packets (no buffer): 35
READ: ok
SENT: M105
READ: ok T:-273.1 /0.0 T0:-273.1 /0.0
SENT: M105
READ: ok T:-273.1 /0.0 T0:-273.1 /0.0
Disconnected.

Here is another M122 from [3] when I cannot get anything to load anymore:


Attempting connection at \\.\COM8...
  Testing plaintext communication protocol...
READ: ok
  Connected to machine!
SENT: T0
READ: ok
SENT: M105
READ: ok T:-273.1 /0.0 T0:-273.1 /0.0
SENT: M122
READ: === Diagnostics ===
READ: RepRapFirmware for LPC176x based Boards (smoothieboard) version 3.1.0 running on LPC176x at 120Mhz
READ: Used output buffers: 1 of 16 (12 max)
READ: === RTOS ===
READ: Static ram: 3624
READ: Dynamic Memory (RTOS Heap 5): 4496 free, 1936 never used
READ: Exception stack ram used: 264
READ: Never used ram: 420
READ: Tasks: EMAC(blocked,52) NETWORK(ready,244) IP-task(blocked,88) HEAT(blocked,992) MAIN(running,1460) IDLE(ready,84)
READ: Owned mutexes:
READ: === Platform ===
READ: Last reset 01:58:02 ago, cause: [power up]
READ: Last software reset details not available
READ: Error status: 0
READ: Date/time: 2020-05-17 19:02:46
READ: Slowest loop: 5.12ms; fastest: 0.25ms
READ: === Storage ===
READ: Free file entries: 4
READ: SD card 0 detected
READ: SD card longest read time 1.8ms, write time 0.0ms, max retries 0
READ: === Move ===
READ: Hiccups: 0, FreeDm: 100, MinFreeDm: 100, MaxWait: 0ms
READ: Bed compensation in use: none, comp offset 0.000
READ: === DDARing ===
READ: Scheduled moves: 0, completed moves: 0, StepErrors: 0, LaErrors: 0, Underruns: 0, 0  CDDA state: -1
READ: === Heat ===
READ: Bed heaters = -1, chamberHeaters = -1
READ: === GCodes ===
READ: Segments left: 0
READ: Movement lock held by null
READ: HTTP is idle in state(s) 0
READ: File is idle in state(s) 0
READ: USB is ready with "M122" in state(s) 0
READ: Aux is idle in state(s) 0
READ: Trigger is idle in state(s) 0
READ: Queue is idle in state(s) 0
READ: LCD is idle in state(s) 0
READ: Daemon is idle in state(s) 0
READ: Autopause is idle in state(s) 0
READ: Code queue is empty.
READ: === Network ===
READ: Slowest loop: 1.62ms; fastest: 0.18ms
READ: Responder states: HTTP(0) HTTP(0)
READ: HTTP sessions: 0 of 2
READ: Interface state: active, link 10Mbps half duplex
READ: Socket States: Listening  Listening  
READ: EthDrv: Dropped packets (no buffer): 35
READ: ok
SENT: M105
READ: ok T:-273.1 /0.0 T0:-273.1 /0.0
SENT: M105
READ: ok T:-273.1 /0.0 T0:-273.1 /0.0
Disconnected.


Also, Jay just submitted a PR for the X5Miniv3. If you're able to compile a firmware build (also Ethernet) that includes this, I'd be happy to test it out.
PCR
Re: RepRapFirmware 3.0 port for LPC1768/9 based boards
May 18, 2020 10:53AM
Re: RepRapFirmware 3.0 port for LPC1768/9 based boards
May 19, 2020 02:31AM
@gloomyandy.

Can you tell me how much support there is at the moment for the TMC2209 driver? Does current setting work?

Thanks.
Re: RepRapFirmware 3.0 port for LPC1768/9 based boards
May 19, 2020 02:38AM
I've never used 2209s (I have a set waiting for me to get around to working on), but the 2208s work fine and the 2209 is supposed to be compatible with them. Pretty much all of the 2208 features are there so you can set current, and other settings with no issues.I'm fairly sure that others are using 2209s with RRF so perhaps they can comment. My intention is to add 2209 features as soon as I can, so stall detection and sensorless homing etc.

Edited 1 time(s). Last edit at 05/19/2020 02:39AM by gloomyandy.
Re: RepRapFirmware 3.0 port for LPC1768/9 based boards
May 19, 2020 03:01AM
@micktol

I use 2209's and they appear to set correctly.
I don't have any issues with skipping steps etc from undercurrent


Based in Darlington, North East
Re: RepRapFirmware 3.0 port for LPC1768/9 based boards
May 19, 2020 02:50PM
Hi all again!

I have a mystery on my setup, from installing the v3.1.0 the machine is not able to make the height map file. I run the G32 correctly, then try the G29 and it goes to everyone point to measure, but when it finishes, no heightmap.csv file nowhere... Initially, my mind was the file is corrupted or read-only or... so I deleted it, no luck. The strange thing is that after G29, the menu "compensation & calibration" shows the option G29 S2 enabled, as it has the mesh compensation active, so heightmap loaded, but if I push the "load heightmap file" button it fails with the file "/opt/dsf/sd/sys/heightmap.csv" not found.
I'm not sure if the errors become with v3.1.0 as I had not used the G29 since RC8 if my mind is correct so could be something in the middle.

In any case, please try to do G29 and check that the .csv file is written, as I found that fault because it never changed, but I have changed the position of the bed...

Kind regards from Spain.
Chema
Re: RepRapFirmware 3.0 port for LPC1768/9 based boards
May 19, 2020 03:31PM
@ ChemaFuji,

I am using v3.1 wifi firmware, I ran a G29 and it was written as normal, at the end I also get a report like this in the console :

G29
25 points probed, min error -0.005, max error 0.122, mean 0.058, deviation 0.035
Height map saved to file 0:/sys/heightmap.csv.

I have this in config .g : M557 X40:200 Y5:190 S40 ; define mesh grid.

Edited 2 time(s). Last edit at 05/19/2020 03:34PM by Micktol.
Re: RepRapFirmware 3.0 port for LPC1768/9 based boards
May 19, 2020 05:20PM
@ ChemaFuji, always worth having a look at the Duet3d forums if you hit a problem, there are many more people using RRF over there than here (though please remember that the Duet forums are primarily a support forum for Duet3d customers). Anyway it looks like this is a known problem with 3.1:
[forum.duet3d.com]

There is also a work around for it!
Re: RepRapFirmware 3.0 port for LPC1768/9 based boards
May 19, 2020 05:21PM
Quote
ChemaFuji
Hi all again!

I have a mystery on my setup, from installing the v3.1.0 the machine is not able to make the height map file. I run the G32 correctly, then try the G29 and it goes to everyone point to measure, but when it finishes, no heightmap.csv file nowhere... Initially, my mind was the file is corrupted or read-only or... so I deleted it, no luck. The strange thing is that after G29, the menu "compensation & calibration" shows the option G29 S2 enabled, as it has the mesh compensation active, so heightmap loaded, but if I push the "load heightmap file" button it fails with the file "/opt/dsf/sd/sys/heightmap.csv" not found.
I'm not sure if the errors become with v3.1.0 as I had not used the G29 since RC8 if my mind is correct so could be something in the middle.

In any case, please try to do G29 and check that the .csv file is written, as I found that fault because it never changed, but I have changed the position of the bed...

Kind regards from Spain.
Chema

There was a bug in the RRF 3.1.0/DSF 3.1.0 that affected the saving of height maps. It is fixed in release 3.1.1.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Sorry, only registered users may post in this forum.

Click here to login