Re: Failed to init device yet again


Dave Schwartz
 

Yes that is correct. It is in flash mode and you have the port selected  now. There must be something wrong with that three-wire harness or the switch. The switch and harness is only there so that you can place it in flash mode without opening the case and moving the jumper (the switch bat is supposed to be accessible through a slot in the case). Getting it to work that way is something to figure out later.

That 'WiFi101/ WiFiNINA' is not used (nor is 'Programmer ArduinoISP') due to our board manager selection overrides.

You are now much closer - hang in there!

On 2020-07-16 12:21 p.m., Gerry Byrne wrote:
Dave,
A photo of the Com Port flyout shows only Com 3 and it already has a tick beside it. I selected it by clicking on it but nothing happened. I still get failure to initialise. When I track back through Device Manager CP2101 has also been allocated Com 3 by Windows. BTW can you read through the other items on the photo. Am I using the correct updater? Is that WiFi101/ WiFiNINA Updater correct?

There was a positive change when I removed the switch harness. The green LED stopped flashing. But I still get failure to initialise. I attach photo - have I done this correctly to achieve flash mode?

I think I will now attempt to rebuild the Onstep sketch as Drew suggested through a fresh install of Arduino and the Onstep elements and hopefully get rid of the Blink stuff. Although I would have imagined the sketch transfer would have initialised in any event once contact was made with the appropriate port.
Gerry



On 15/07/2020 20:41, Dave Schwartz wrote:
I'm going to assume that the COM port you are selecting in the IDE is the one that appears when you connect the CP2102. Are you actually selecting that from the 'Port' flyout ? Your picture doesn't show a port as being selected. You have to actually select it, its not good enough that it just be in the flyout list.

Let's eliminate that wiring harness to the flash-run switch. Go back to using the original jumper. The existing yellow jumper on BOOT1 is where it always stays, bridging the center and '0' end pins. Put the one on the BOOT0 header... the same end as BOOT1 is the run position and the opposite (bridging the center and '1') end pins is the flash position. I believe the green LED should not be active when in flash mode because not even the original blink sketch will be running in that mode.

On 2020-07-15 11:40 a.m., Gerry Byrne wrote:
Dave,
Yes, it's a brand new replacement STM32 and it flashed from the get-go, before I attempted to upload anything to it.

I think you may have a point about the blink sketch (Drew makes a similar point). I never realised Arduino behaved like that. But would that completely explain the failure to initialise?

Since writing earlier I did a circuit test on links between the CP2102 and the STM board. One pin on the CP2102 appeared slightly loose with an intermittent circuit  between it and A10 on the Blue Pill and I re-soldered it and the connection is now perfect between RX, Tx and A9 and A10.. But still I cannot upload.

Here, in excruciating detail, is what I have been doing.

I unplug everything. Move the switch to flash. Power up via the 5V supply on the PCB. Red LED lights, Green LED flashes. Then plug USB from the laptop to the CP2102. Instruct the IDE to upload the Onstep sketch. It compiles and then goes into upload mode. It says "done uploading" but inspection reveals the "failed to init device" message again along with the other stuff about blink. I repeat by depowering, unplugging the USB and repowering and reinserting the USB plug followed by another attempt at uploading.

My board settings are as in the attached photo. COM Port is not shown but it is COM 3 and this is confirmed by Device Settings. When I changed it to COM 2, the IDE went looking for COM 3 and I changed it back.

I attach other pics attempting to show the switch connections to the Blue Pill.

Many thanks for your interest.
Gerry









On 15/07/2020 15:05, Dave Schwartz wrote:
Is the flashing green LED the behavior of the STM32 before you have uploaded anything to it? If so, that is normal because there is a default blink program uploaded to it as a test step during fabrication. All the ones I have had did that.

I have no idea what the 'Invalid library' could be... not the foggiest idea why something would be trying to access something from the blink sketch an during OnStep build unless you have somehow corrupted the OnStep directory with blink sketch code. A complete wipe of the OnStep directory and refresh from the repository might be needed.

Please describe, in excruciating detail, the steps you are performing when preparing the STM32 for the upload and restoring it to run mode. Perhaps include detailed descriptions or a picture of how the flash/run switch is connected to the header on the STM32 (or the configuration of the jumpers if you are not using the switch). This has been conquered by literally hundreds of people so there must be something in the sequence that you are doing that is incorrect but you don't recognize it because you've never seen it work successfully. Nothing worse than having a procedure wrong and doing it over and over expecting a different result because you haven't realized a tiny error. Been there, done that.

On 2020-07-15 8:24 a.m., Gerry Byrne wrote:
I continue to receive the following error messages (see below this message) when attempting to flash the STM32 with Onstep.

I have reloaded all the appropriate software libraries, etc, and the sketch compiles  without problems. Uploading is the problem.

I have replaced both the STM32 Blue Pill and the CP2102 to no avail. My laptop now recognises the CP2102 and has allocated it to Com 3 (previously I got a "device is faulty" message). It flashes red about four times when the USB is connected then remains a steady red.

The new STM32 Blue Pill has a power light (red) on when the PCB power supply (5V) is connected. However it also has a rapid flashing green LED. Is this normal?

Gerry Byrne

Error Message:

*Failed to init device *
*stm32flash 0.4*
*http://stm32flash.googlecode.com/*
*Using Parser : Raw BINARY*
*Interface serial_w32: 115200 8E1*
*Invalid library found in C:\Users\gerbyrne\Documents\Arduino\libraries\blink: no headers files (.h) found in C:\Users\gerbyrne\Documents\Arduino\libraries\blink*
*Invalid library found in C:\Users\gerbyrne\Documents\Arduino\libraries\blink: no headers files (.h) found in C:\Users\gerbyrne\Documents\Arduino\libraries\blink*
--
*Copernicus*




Join main@onstep.groups.io to automatically receive all group messages.