Topics

Programming issue with FYSETC S6 v2.0


John Petterson
 

I was trying to convert my one working OnStep box from AltAz mode to GEM mode yesterday and ran into an issue I thought I should share.  I have the option to run my box at either 12V or 24V, and I keep it in 24V mode most of the time.  I connected it to my Win computer and got the normal connect sound.  Then I connected the Boot0 jumper (I have it wired to an external pushbutton on the box so I can program without opening the box) and reset the board, got the Win disconnect sound and after several seconds I got a popup message that said the last USB device I connected was not recognized.

Remembering the issues with the Wemos Wifi board about not being able to load software when it is connected to the OnStep, I opened the box and one at a time disconnected all the wires on the FYSETC card and rebooted each time.  It was not until I had all of the wires off of it that it successfully went into boot mode and I was able to reload the software.  Then I added one connector at a time, and after each connection I tried again and each time it was able to connect and reload the software.  Puzzling.

I brought it upstairs and connected to the GM8.  Connected everything, set all the switches right and tested.  I found the RA motor needed to be reversed, so I took it back downstairs to reload it again.  Once again it did not work.  After a bunch of testing that I will skip the details on I was at the point of completely taking it apart and replacing the FYSETC board when I figured out that if it was being fed 24V, it would not go into boot mode.  I could get it to boot mode either by feeding it 12V on the board input, or turning off the power supply and moving the jumper next to the USB jack to feed 5V from the USB instead of the 12V supply.   It is completely repeatable.  I will do more testing, check some different power supplies and so forth.  But be warned this may be an issue.

After  bunch of thought, I realized that the first time I had flipped the 12V-24V switch while fumbling for the Boot0 button just before it started working. I did not realize that happened at the time.  Overall I probably spent 3 hours learning this "feature" about my board.  I intend to test with some other FYSETC boards soon, but maybe someone else can check their boards as well and see what those do.

John


Khalid Baheyeldin
 

I have an almost identical problem with the FYSETC S6, but the V1.2 version.

When the WeMos is connected, and I press the Boot0 button, I can flash it without issues, even when it is only powered from the PC's USB port.

If the GPS module is connected, then it is almost impossible to get the USB device recognized on the PC. Mine runs Linux, and comes up as the DFU device with a different ID than the when in regular (run) mode. If I disconnected the wire going to GPS 5V input, the boards comes up in DFU mode and is recognized by the PC without flaw.

I don't have a permanent daughter board for the S6 yet (since my cardboard box works for now), but was planning on having a switch on the GPS power wire for flashing.

Reading your message, it is not clear to me what you did to make it work consistently. Can you summarize the sequence that works for you?


Dave Schwartz
 

I also have unpredictable behavior with S6 flashing. After being powered up and the USB connected to Windows, I hold the BOOT0 button and press RESET... the COM device always goes away but it's rare that the DFU device comes up the first time. I often have to repeat BOOT0/RESET multiple times until the DFU device comes up. I have not been able to discover any combination of duration or timing of press/release that makes it reliable so I just keep repeating until Windows makes the appropriate noises.


On November 2, 2020 1:09:05 p.m. EST, Khalid Baheyeldin <kbahey@...> wrote:
I have an almost identical problem with the FYSETC S6, but the V1.2 version.

When the WeMos is connected, and I press the Boot0 button, I can flash it without issues, even when it is only powered from the PC's USB port.

If the GPS module is connected, then it is almost impossible to get the USB device recognized on the PC. Mine runs Linux, and comes up as the DFU device with a different ID than the when in regular (run) mode. If I disconnected the wire going to GPS 5V input, the boards comes up in DFU mode and is recognized by the PC without flaw.

I don't have a permanent daughter board for the S6 yet (since my cardboard box works for now), but was planning on having a switch on the GPS power wire for flashing.

Reading your message, it is not clear to me what you did to make it work consistently. Can you summarize the sequence that works for you?

--
Sent from my Android device with K-9 Mail. Please excuse my brevity.


John Petterson
 

I did a bit more testing of this issue today.  I have both 1.2 and 2.0 versions and they are now both behaving similarly. Khalid, I have two versions of the GPS unit that is in your photos, one with a red LED and one with a green LED.  The logos are slightly different, but they seem to operate in a similar way.

It turns my mind never connected the GPS being plugged in with the issue.  Today I tested it and it definitely is.

If I connect the computer (no other power applied) while holding the Boot0 button down, it connects fine and I can flash it.

Any other combination - power already applied through the 12V port, use the reset button and Boot0, etc. is likely to fail.
But once that is up, I can reset it multiple times, both with and without the Boot0 button and it works.

However, if I remove the GPS unit and plug in the other GPS unit, then use the Boot0 and reset buttons, it fails and I have to remove power and restart the board again with the Boot0 button while connected to the USB port.

With the 2.0 board and the selectable 5v set to the 12V input, I can turn the power off, hold the Boot0 button and turn the power on instead of unplugging the USB connection.  That was how I was testing yesterday and why it seemed that it was working all the time.

So for me the key is the power reset. It seems to allow it to come up in boot mode properly every time. Using the reset button to get into boot mode is unreliable, it works sometimes and fails sometimes.  And booting into boot mode with the computer not connected is also unreliable. If your USB does not provide power for the FYSETC, you have to have it plugged in before you apply power to the board or the setup may fail.  Dave, I think you will have to unplug the USB, hold the Boot0 and plug the USB back in to get a reliable DFU device.

Let me know if you are seeing this same thing.


John Petterson
 

A couple more thoughts -

Because I was seeing this issue and could not quantify it 3 weeks ago, I thought the board I was using would no longer flash at all. I complained to the vendor and he sent me one replacement board along with my order for another.  Obviously it is having the same issues.

Second, as I discussed in my other thread my daughter card has separate 5v and 3.3v power supplies for all of the devices on those cards.  Because these are simple step down regulators that need to be adjusted before use and I have found that they come from the factory set at random usually high voltages, I have a header that allows me to disconnect them from anything else until they have been set after the boards are assembled.  I was planning to simply use a jumper for connecting these after adjusting them.  Now I am thinking I will put a DPST switch to allow those to be turned off so the FYSETC does not see the GPS and WiFi and Network cards and allows the flashing to proceed.  Thoughts?


John Petterson
 

Since I sent the two messages above I did a little more restarting / plugging in devices and removing them.  Using my 2.0 so I can switch power on and off without pulling the USB, but I expect that the 1.2 works the same.

It seems that any time I add or change anything I have to do a cold restart in DFU mode with the computer attached to get a good programming mode, and once I had to restart twice to get there.  I started with the FYSETC and no attached parts.  It booted cleanly into DFU mode.  Then I plugged in the Wemos, and reset it with the reset button and it failed.  Power reset and it started OK. Then I added the GPS, and had the same issue and same solution.  Then I changed GPS cards, and repeated the issue and solution.

The key is power reset with the USB attached and the Boot0 button / jumper pushed.  One time I had to reset the power twice, but the second time it worked.  Repeat boots using the reset button often work but sometimes fail. But changing anything usually causes it to fail until a power reset with the Boot0 button held.


Khalid Baheyeldin
 

On Mon, Nov 2, 2020 at 04:49 PM, John Petterson wrote:
I started with the FYSETC and no attached parts.  It booted cleanly into DFU mode.  Then I plugged in the Wemos, and reset it with the reset button and it failed.  Power reset and it started OK. Then I added the GPS, and had the same issue and same solution.  Then I changed GPS cards, and repeated the issue and solution.
I got more confused by the many messages. It is a messy day for me with internet outages ...

The above says 'power reset' solves the problem.

Can you describe what power reset is? Does it mean turning off 12V (or 24V) power, then connecting it again?
If this is the case, I am not sure if it works, since the board will get USB 5V power from the PC as long as it is plugged in.

Please explain again, concisely.


John Petterson
 

OK.  2 scenarios. 

1) If you are supplying power to the FYSETC from the USB cable, you have to remove all power from the FYSETC.  Turn off/unplug both 12V and USB.  Then press the Boot0 button and hold it down while you plug in the USB cable again.  Then you can plug in the 12V.  But the USB has to be first.

2) If you can disconnect the USB power (either with the jumper on the 2.0 card or by cutting the power wire in the USB cable or using a hub that can disconnect that power), then you should leave the USB cable plugged in. Turn off or unplug the 12V, the board should have all LEDs off. Hold the Boot0 button. Turn on the 12V.

Is that clear?


Khalid Baheyeldin
 

On Mon, Nov 2, 2020 at 05:44 PM, John Petterson wrote:
Turn off/unplug both 12V and USB.  Then press the Boot0 button and hold it down while you plug in the USB cable again. 
For me, that works flawlessly as long as the GPS power pin is not connected. The DFU device is seen on the PC and I can flash the board.
However, if the GPS power pin is connected, the PC never sees the DFU device.

The other scenario is not applicable.


John Petterson
 

I have seen the same failure with the Wemos WiFi connected but no GPS, so I do not think it is just the GPS that is doing it.  It is not as repeatable but it has happened more than once. So don't be surprised if it happens there too.

But I am very happy I was able to help and you are seeing it work reliably now.


Khalid Baheyeldin
 

On Mon, Nov 2, 2020 at 09:11 PM, John Petterson wrote:
I have seen the same failure with the Wemos WiFi connected but no GPS, so I do not think it is just the GPS that is doing it.  It is not as repeatable but it has happened more than once. So don't be surprised if it happens there too.
I don't recall it happened with only the WeMos connected.
Only the GPS causes it to behave like that.

If I power from 19V, then press the Boot0, simultaneously pressing the Reset button, then releasing the reset button, then the Boot0, then plugging in the USB to the PC, then it sometimes works. Requires a couple of tries until it works, even when the DFU devices shows up in the list of USB devices on Linux.


carcarlodf@...
 

Hi all!
first of all... thanks to Howard and Khalid for their precious and helpful work!
I have recently upgraded my Onstep gear with new Fysetc S6 v 2.0 and TMC2130 SPI with success thanks Khalid instructions on wiki page.
I use Onstep since 2015 (arduino mega version with TMC2100) on my Eq6 with sanyodenki steppers and belt transmission...this is my pictures taken with it. https://www.astrobin.com/users/CarCarlo/
This is an old post but i want to share my experience in putting the board in DFU Mode and uploading firmware using Linux.
I figured out that if i connect GPS nema Module to SoftSerial2 (RX2/TX2) on Fysetc S6 i can put the board in DFU mode without disconnect power on GPS module.
The  2.0 version of the mainboard does not have boot0 push button and instead of this FysetC has changed it with a 3 pin. This helped me to put a on/off switch outside the box for simplicity.
 
I hope that this can help...

CS
Carlo


Khalid Baheyeldin
 

On Wed, Jan 13, 2021 at 12:04 PM, <carcarlodf@...> wrote:
I figured out that if i connect GPS nema Module to SoftSerial2 (RX2/TX2) on Fysetc S6 i can put the board in DFU mode without disconnect power on GPS module.
With the V1.2 S6, I had to put an on/off switch on the GPS, which is connected to RX3/TX3 (on EXP1).
I will try changing that to RX2 and TX2 on the V2.0 board, and see what the difference is.

Where did you power the GPS 5V and GND from?

The  2.0 version of the mainboard does not have boot0 push button and instead of this FysetC has changed it with a 3 pin. This helped me to put a on/off switch outside the box for simplicity.
Yes, I intend to do the same: add an on/off switch on the Boot0 headers. That was the reason I ordered the V2.0 board: to avoid having to open the box when I flash it.


Howard Dutton
 

On Wed, Jan 13, 2021 at 10:56 AM, Khalid Baheyeldin wrote:
Yes, I intend to do the same: add an on/off switch on the Boot0 headers. That was the reason I ordered the V2.0 board: to avoid having to open the box when I flash it.
Or, if using the latest master.... wire the Boot0 pin to the WeMos D1 Mini pin labeled "D7" then turn on the following option and see if that works (as it does for the STM32F411CE.:)

#define DISPLAY_RESET_CONTROLS        FWU //    OFF, ON to allow reset of OnStep, FWU for STM32 firmware upload pin HIGH.     Option

Remember to set SERIAL_SWAP to OFF also since the swapped serial port location is at D7 and D8, it will warn you if you haven't.  You should, hopefully, then be able to hit a button at the bottom of the website "Config" page to enter firmware upload mode.  You could first confirm that software based reset works by sending the :ERESET# command and watching to see if it reboots before going to the trouble of wiring things up.  It's not going to work otherwise.  Finally, AFAIK the S6 has a custom bootloader (where the F411CE uses the OEM bootloader) so how that behaves if/when reset in software is an unknown.  You could simulate it in a quick test by shorting the Boot0 HIGH then sending the command but that gets tricky since in my testing sending the command across USB causes USB to crash... something to do with an ongoing transaction in the middle of a reset I suppose.  Sending the command from the WiFi Addon was fine and USB comes right up in DFU mode on an F411.


carcarlodf@...
 

Where did you power the GPS 5V and GND from?


On EXP1


Dave Schwartz
 

Yes, there is 5V and GND on both EXP connectors. Unfortunately, there is no 3.3V on the EXP connectors and that's what my SPI BME280 needs so I took it of the 3.3V (regulator output) pin on the WiFi module.

On 2021-01-16 5:33 p.m., carcarlodf@gmail.com wrote:
/Where did you power the GPS 5V and GND from?


/On EXP1


John Petterson
 

5V appears all over - the UART and Z+ (software serial RX pin is there too) both have 5V and ground.  All the other 3 pin connectors between those two, including the Y+ which has software serial TX pin, has +3.3V and that is where I am getting it.

John