Problem with custom made Board und HiD Bootloader

If you made your own board, post here, unless you built a Maple or Maple mini clone etc
Post Reply
jenspogo
Posts: 30
Joined: Mon Feb 24, 2020 10:42 am

Problem with custom made Board und HiD Bootloader

Post by jenspogo »

Hey guys :)
I have designed my own STM32F103 Board as Raspberry Pi Extension with some additional Stuff like PWM up to 120W and Pmos Switches and som Inputs for Industrial 0-10V and 0-20mA input.
I also would like to use the Board with the HID bootloader from https://github.com/Serasidis/STM32_HID_Bootloader. I am able to programm the MCU with the ST-Link and I am also able to flash the bootloader. When I start Programming from the Arduino IDE, the board is recognized as a Bluepill (like i have planned) but programming gives an Error: Comport not found. I'am able to programm the Board with the ST Link and open the COM port to recieve Sensor Values- therefore it is not completely wrong designed.
I'm using an externel 24V Voltage Source. Is this the problem?
This are the Sheets:
K640_K640_K800_Pwr-sheet.JPG
K640_K640_K800_Pwr-sheet.JPG (79.77 KiB) Viewed 8387 times
USB-Micro_sheet.JPG
USB-Micro_sheet.JPG (61.44 KiB) Viewed 8387 times
K800_MCU_sheet.JPG
K800_MCU_sheet.JPG (59.12 KiB) Viewed 8387 times
mrburnette
Posts: 633
Joined: Thu Dec 19, 2019 1:23 am
Answers: 7

Re: Problem with custom made Board und HiD Bootloader

Post by mrburnette »

jenspogo wrote: Thu May 28, 2020 11:03 am ...
I have designed my own STM32F103 Board as Raspberry Pi Extension with some additional Stuff like PWM up to 120W and Pmos Switches and som Inputs for Industrial 0-10V and 0-20mA input.
...
I'm using an external 24V Voltage Source. Is this the problem?
One would not think the input supply is an issue unless your 5V regulator is having an issue, but you may wish to look at the 5V and 3.3V outputs and verify with a scope that your supply voltage is noise free. Additionally, if your HAT is on the rPi, you may be getting some RF hash into the traces which can play havoc with the uC. You can try putting a grounded shield between the rPi and the HAT ... I have used this stuff in the past with great success:
https://www.google.com/search?&q=mu+metal
but,
you can also cover aluminum foil with package tape (use a single stranded copper wire against the foil before taping) as a simple test. The foil should be grounded at the rPi ground plane.

Usually when exploring these complicated things, I try and simplify the testing ... forget the rPi, forget the 24V and use a 9V or 12V drycell battery holder for C/D cells. Now you are dealing with a simply homemade board, a stable power source, no RF hash from the rPi ....
Just a thought.

Ray
stevestrong
Posts: 502
Joined: Fri Dec 27, 2019 4:53 pm
Answers: 8
Location: Munich, Germany
Contact:

Re: Problem with custom made Board und HiD Bootloader

Post by stevestrong »

Can you post the complete Arduino generated message?
User avatar
Vassilis
Posts: 24
Joined: Wed Dec 18, 2019 3:04 pm
Location: Thessaloniki, Greece
Contact:

Re: Problem with custom made Board und HiD Bootloader

Post by Vassilis »

After you burn the HID bootloader with ST-Link, try to upload a blink sketch with HID Bootloader by using the following settings
HID-BL_Settings.jpg
HID-BL_Settings.jpg (83.63 KiB) Viewed 8358 times
Vassilis Serasidis
https://www.serasidis.gr
jenspogo
Posts: 30
Joined: Mon Feb 24, 2020 10:42 am

Re: Problem with custom made Board und HiD Bootloader

Post by jenspogo »

Hey everybody,
thanks for your replies :)
actually I just plugged in the USB - no other Supplies.

this are the Arduino Settings:
K640_einstellungenHIDBootloader.JPG
K640_einstellungenHIDBootloader.JPG (36.83 KiB) Viewed 8338 times
and here ist the generated Message:

Code: Select all

+-----------------------------------------------------------------------+
|         HID-Flash v2.2.1 - STM32 HID Bootloader Flash Tool            |
|     (c)      2018 - Bruno Freitas       http://www.brunofreitas.com   |
|     (c) 2018-2019 - Vassilis Serasidis  https://www.serasidis.gr      |
|   Customized for STM32duino ecosystem   https://www.stm32duino.com    |
+-----------------------------------------------------------------------+

> Trying to open the [COM16]...
> Toggling DTR...
> Searching for [1209:BEBA] device...
##########
Error - [1209:BEBA] device is not found :(> Searching for [COM16] ...
> [COM16] is found !
> Finish
Der ausgewählte serielle Port > Finish
 ist nicht vorhanden oder das Board ist nicht angeschlossen
greetings, Jens
jenspogo
Posts: 30
Joined: Mon Feb 24, 2020 10:42 am

Re: Problem with custom made Board und HiD Bootloader

Post by jenspogo »

I have also tried the Maple bootloader with a positive result:

Code: Select all

maple_loader v0.1
Resetting to bootloader via DTR pulse
Reset via USB Serial Failed! Did you select the right serial port?
Searching for DFU device [1EAF:0003]...
Assuming the board is in perpetual bootloader mode and continuing to attempt dfu programming...

Found it!

Opening USB Device 0x1eaf:0x0003...
Found Runtime: [0x1eaf:0x0003] devnum=1, cfg=0, intf=0, alt=2, name="STM32duino bootloader v1.0  Upload to Flash 0x8002000"
Setting Configuration 1...
Claiming USB DFU Interface...
Setting Alternate Setting ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
Transfer Size = 0x0400
bytes_per_hash=426
Starting download: [##################################################] finished!
error resetting after download: usb_reset: could not reset device, win error: Ein nicht vorhandenes Gerät wurde angegeben.
state(8) = dfuMANIFEST-WAIT-RESET, status(0) = No error condition is present

Done!

Resetting USB to switch back to runtime mode
the Code is the simple blink, with an added Serial.begin and Serial.println("Hello World");
Serial Monitor works. but there is still an error message which should not be there right?:

Code: Select all

error resetting after download: usb_reset: could not reset device, win error: Ein nicht vorhandenes Gerät wurde angegeben.
in Englisch it should be something like: error resetting after download: usb_reset: could not reset device, win error: A device that does not exist was specified.

what might be the Problem with the HID bootloader?
jenspogo
Posts: 30
Joined: Mon Feb 24, 2020 10:42 am

Re: Problem with custom made Board und HiD Bootloader

Post by jenspogo »

ok, strange...

first things first: It works right now - but I don't know why :D

Following things I have done with my three Boards and it works with every Board now:
programm the HID Bootloder (no programming possible, but I can read out the Serial.print stuff from programms programmed with ST Link)
programm the Maple Bootloarder - works fine
Programm the HID Bootloader - works pefectly ...
stevestrong
Posts: 502
Joined: Fri Dec 27, 2019 4:53 pm
Answers: 8
Location: Munich, Germany
Contact:

Re: Problem with custom made Board und HiD Bootloader

Post by stevestrong »

jenspogo wrote: Fri May 29, 2020 11:36 am error resetting after download: usb_reset: could not reset device, win error: Ein nicht vorhandenes Gerät wurde angegeben.
state(8) = dfuMANIFEST-WAIT-RESET, status(0) = No error condition is present
This is does not really mean an error, do not pay attention to this, the upload should be successful.
Post Reply

Return to “Custom design boards”