Date
1 - 16 of 16
The Dreaded Failed to Init Message
Ed Eastburn
I had no issues last week flashing the STM32 with Onstep. After the weekend I made some changes in the Config file (lowered the Degree/Second rate) then tried to flash Onstep. Then I got the dreaded message. I have tried many times in a row to flash, no success. I have checked the Run/Flash switch, it is fine. Used jumper wires to see if it was the cables from the switch to the STM32 board, no change. I even changed the STM332 board, no change. My STM32s had the #104 resistor for R3, so I shorted the R3 with solder. Anything else to try? Is it possible that my USB 2102 has stopped working?
I have read that using some flash program fixes the issue. Is there a write up on how to connect to & use that program? Is it an Arduino file? Thanks
|
|
Ed Eastburn
More info:
STM32 appears to be working normally. When in run mode, the micro, green LED flashes, and when in flash mode the green LED is off. My computer runs Windows 10 Pro. I double checked the Tool settings in Arduino; everything is correct, as it was when it did flash the STM32 board. I turn power off to the Onstep system with the switch in the flash mode, then unplug the mirco USB from the USB 2102 board, so Windows should think the STM32 is in flash mode each time I connect to it. The USB 2102 board appears to be operating normally. This evening I will remove the jumper wires that connect the Run/Flash switch to the the STM32 board and just try the board supplied jumper.
|
|
Ed Eastburn
Tried using just the supplied jumper in the flash position tonight. Still not able to flash the STM32 board (Blue pill). I noted that the USB 2102 board still has a solid LED when the computer is plugged in, changing to a flashing LED as Arduino tries to flash the board, then the LED returns to a solid light once Arduino gives the Failed to Init message.
Will try the STM32Flash Program tomorrow. Hoping this will work. I'm so close to finishing my 20" Dob running on Onstep. It works, I just need to slow down the slew speed a bit. Curse communication problems; my only weakness! LOL
|
|
Ed Eastburn
Tried STM32flash -u command. With the board supplied jumper in the flash position; the computer tried to make a connection but still came back with the failed to init message. Tried this with 2 boards, same results. The computer is using COM4 which always worked in the past. I checked the properties still shows bit rate-9600: data bits-8 bit: parity-none: stop bit-1: flow control-none.
I tried uninstalling the USB UART driver and allowing Windows to reinstall it, then checked that it was the latest version. Tried to flash to the Blue Pill again; still get the failed to init device message. Everything seems to point to a hardware issue; maybe the main PCB board has gone bad? I am stumped; if anyone here can suggest something that would help pin down the issue I would be much obliged.
|
|
Mike Ahner
Hi Ed, Could you post your config.h file, as well as the error message you're getting, please? Also it might be helpful to see how your Arduino IDE is configured for the STM32 board. Did you by chance allow the IDE to upgrade recently? Maybe post your versions for the IDE.
|
|
Ed Eastburn
Hi Mike, thank you for the help.
Yes, I am using the PCB board for the Blue Pill controller. It is the kit from Khalid Baheyeldin and George Cushing. Version 3.16 of Onstep Version 1.8.13 Arduino IDE I did try uploading the blink program, changing the default blink rate, since my Blue Pill comes pre-loaded with a blink program. I received the same failed to init message. I tried using both the 64K & 128K memory size from the tools selectin for the Blue Pill; received the failed to init on multiple tries. I did let Arduino IDE update the Library but no the IDE. The update occurred yesterday after I made my last post here, so it was not when I tried uploading Onstep to the Blue Pill. Here are screen shoots of the tools window, error message, COM port info & attachment of Config.h file. I did not make any adjustments to any of these settings, other than changing the slew rate in the config.h file between the last successful upload and when I tried without success to upload the revised config.h file. Thank you again for you help Mike.
|
|
What you posted so far points to either a Windows driver problem, or a component failure problem.
For the former, I can't help since I don't use Windows, but the majority here do, so someone can help with that. As far as components go, the basic circuit needed for flashing is simple: the STM32 and the CP2102, plus power. You do have power, since you see the LEDs do what they need to do on the CP2102 (steady when idle, and flash when uploading the firmware). That leaves the pins going from PA9 and PA10 on the STM32 to the CP2102. Disconnect power from the board, then using a multimeter continuity function, trace those two pins from the top of the STM32 module, back to where should connect on the TX and RX on the CP2102. This either finds, or excludes, that there is a soldering problem somewhere. Next step is the Boot0 header on the STM32, but that seems to work since it is solid when in flash mode, but blinks when in run mode (so basically does what it is supposed to do). Just to be safe, check the STM32 Wiki page under troubleshooting and check the resistor there, and follow the instructions in there.
|
|
Mike Ahner
You posted the error message at the end of the compile/upload attempt. Were there any other errors prior to the "failed to Init"? Did the IDE successfully compile, open the device/COM and upload?
It's obvious that something has changed since you last flashed the STM32, so along with what Khalid has suggested, you might try a new USB cable. It's also possible the micro-connector on the CP2102 has a problem. You can look in Device Manager to verify the CP2102 is actually using COM4 still, sometimes that happens in Windows. You can also uninstall/reinstall the driver from the Device Manager panel.
|
|
Mike Ahner
On Sun, Feb 21, 2021 at 01:16 PM, Mike Ahner wrote:
You can look in Device Manager to verify the CP2102 is actually using COM4 still, sometimes that happens in Windows.You can also try a different USB port on you computer, that should create a new COMx port with a new driver installation.
|
|
Ed Eastburn
Khalid :
|
|
On Mon, Feb 22, 2021 at 10:25 AM, Ed Eastburn wrote:
In my experience, if there is a wrong resistor at R3, and that manifests itself as failure to put the Blue Pill in programming/flash mode when Boot0 is jumpered for programming mode. Just soldering over that resistor (as in the Wiki) solves this issue. But if you are seeing a behaviour difference from Flash and Run positions on the switch, then that can safely rule out the resistor issue, since the Blue Pill already recognizes the difference. If you can program the Blue Pill with the ST-Link, then the R3 resistor and Flash/Run switch are all moot. You can then just flash OnStep over the ST-Link, and be done with it ...
|
|
Dave Schwartz
Your CP2102 is obviously working because Windows recognizes it but the IDE tool is not able to talk through it to the Blue Pill module.
Assuming you have the external power on such that the BP power LED is on (more than once I've gotten the 'Failed to init' message because I forgot to turn on the power), my feeling is that it is probably related to an unreliable solder connection at the pins of the CP2102, either at the module or where they go into the PCB. Since the pins from the module are only at one end, they can be put under stress by the action of connecting and disconnecting the cable. This can produce a fracture in a marginal solder connection and is the reason that I put quite a bit of emphasis in the assembly instructions about stabilizing the module by injecting some non-conductive adhesive like hot melt glue between the module and PCB. Try reflowing the solder where the pins go through the CP2102 module and where they go through the PCB by simply holding the tip of the iron against the solder for about 5 seconds. It is probably not required to actually add any more solder.
|
|
Ed Eastburn
Khalid: I have already removed the R3 and soldered between the ends (shorted it). That allowed me (earlier) to repeatedly flash the Blue Pill as I was making adjustments for my mount; up to the point when communications stopped. Based on everything you and others have suggested, and I have tried, it seems to isolate the issue to the CP2102 board. Dave has a good suggestion to try reheating the solder connection on the CP2102. Seems like that would show up when I was doing the common test, as trying to keep the probes on the pins would induce stress on the CP2102 board; then not as mush stress as plugging in the USB micro connector. I'm thinking of unsoldering the CP2102 board from the PCB, replace it with a female header, then connect a new CP2102 board via the header. I will need to hot glue a small plastic riser under the CP2102 to provide mechanical support, and fix the CP in place. Does Onstep use the CP2102 for anything else other than flashing the Blue Pill?
|
|
Dave Schwartz
The CP2102 is also the conduit for the SerialA command channel (or verbose output, not both at the same time).
toggle quoted messageShow quoted text
On 2021-02-22 12:01 p.m., Ed Eastburn via groups.io wrote:
Khalid:
|
|
On Mon, Feb 22, 2021 at 12:51 PM, Dave Schwartz wrote:
The CP2102 is also the conduit for the SerialA command channelIn other words, the USB port is used when you want to control OnStep from a PC or a Raspberry Pi. If you don't use either, then just flash the Blue Pill module with the ST-Link adapter that you are getting and forget about the USB port.
|
|
Ed Eastburn
Update:
It was that CP2102 board. I unsoldered the original CP2102 board,( don't do it unless you must!) soldered in a new female riser connector, and plugged a new CP2102 board in. Windows did not install the driver automatically, so I had to go to the CP2102 website and download/install the drivers. Started up Arduino and flashed onstep to the SMT32, no problems, no error messages. Yes!!
|
|