ECA Board Issues

BrotherV
Tue Dec 01, 2015 4:05 pm
Hello everyone(sorry about my English)
I’ve started working with STM32 less than a week and now I have a problem. I read many topics but I did not find right solution.
I have bought a custom board and this board does not have a bootloader. unfortunately, I do not know how to use with stm32loader.exe
Image
So, I tried to find another way and I found a solotion http://www.scienceprog.com/flashing-pro … ootloader/
I’ve downloaded Flash Loader Demonstrator software and connected PL2303 USB to serial converter to the board.(BOOT1=0; BOOT0=1)
Image
Now the software can’t communicate with board.
Image
How can I solve this problem. I am grateful that you help me.

martinayotte
Tue Dec 01, 2015 5:31 pm
You probably need to first diagnose the PL2303 itself in stand-alone with loopback between TX/RX. Make sure you have echo in Putty or other terminal.
This is because there are many USB-TTL which use clone chips, and the official drivers on Windows prevent them to work properly.
On Linux, this is not an issue, the drivers are working properly.
With FTDI chips, it is even worse, if you have ever heard about their “bricking” driver.

BrotherV
Tue Dec 01, 2015 6:35 pm
PL2303 works well, Actually I’m programming Arduino pro mini with this.
Image
Image

martinayotte
Tue Dec 01, 2015 10:13 pm
Don’t have much clues to give.
In the mean time, you can maybe try with the stm32flash tool, there is a Windows version in Arduino_STM32/tools/win/stm32flash.exe

RogerClark
Tue Dec 01, 2015 10:56 pm
Did you set Boot0 to High and make sure Boot1 is Low, then reset or power cycle the board

It should work, as all USB to serial I have tried including the PL and CP ones work fine

PS.

Post a link to the board on the suppliers website and also a schematic if possible


stevech
Tue Dec 01, 2015 11:35 pm
RogerClark wrote:Did you set Boot0 to High and make sure Boot1 is Low, then reset or power cycle the board

It should work, as all USB to serial I have tried including the PL and CP ones work fine

PS.

Post a link to the board on the suppliers website and also a schematic if possible


RogerClark
Wed Dec 02, 2015 12:03 am
Strange

Both the pacific and the sil labs boards work fine for me under W7 prof


stevech
Wed Dec 02, 2015 4:53 am
RogerClark wrote:Strange

Both the pacific and the sil labs boards work fine for me under W7 prof


RogerClark
Wed Dec 02, 2015 5:00 am
Sorry

Mine are Prolific not “Pacific”

http://prolificusa.com/pl-2303hx-drivers/

I tend to stay away from FTDI as its impossible to tell if they are real or fake, i.e even the expensive ones may be fake so there is no point taking the risk of FTDI bricking them for you


BrotherV
Wed Dec 02, 2015 9:19 am
This board designed with a Persian company ECA Team http://eshop.eca.ir/%D9%85%D8%AD%D8%B5% … board.html
Unfortunately, this board does not have a switch for Boot1 and I set it manually 0 with 10K resistor. Is there the possibility that the chip is broken?
schematic of board:
Image

Connectivity:
Image


RogerClark
Wed Dec 02, 2015 10:29 am
Its unlikely that the chip is broken (but not impossible)

You must pull Boot1 LOW (but I see you have done this with a 10k resistor

Try Boot0 switch in both positions

Failing that, its best to buy a cheap STLink programmer tool

E.g. Like this

http://www.ebay.com/itm/Mini-ST-Link-V2 … SwstxVOgsj

I don’t know if they ship to Iran, but I’m sure you can find a vendor who will send to you

BTW. Also sometimes, with the STM Flash Loader, I have to press Reset several times before it works e.g.

press 2 or 3 times, the try connecting with the STMFlash Loader program


madias
Wed Dec 02, 2015 12:09 pm
I have to agree Roger, for playing around with STM32 a ST-Link v2 (clone) is a nearly a “must have” especially if you are in troubles.
Here is the aliexpress link page for them: http://tinyurl.com/hok2v34
BTW: the schematic is’nt readable, much too small.

mrburnette
Wed Dec 02, 2015 1:04 pm
madias wrote:
BTW: the schematic is’nt readable, much too small.

zoomx
Wed Dec 02, 2015 1:43 pm
I think that madias means the schematic in the previous page.

martinayotte
Wed Dec 02, 2015 2:06 pm
From the “connectivity” picture, we can see that this board is poorly designed since there are at least four R7 on the silkscreen along with three C1. :(

BrotherV
Wed Dec 02, 2015 2:30 pm
Thanks Roger,Thanks madias, Thanks mrburnette
Finally I did it, Roger was right.
I changed Boot0 switch in another position and pressed reset button, Finally worked.(I had done it before on another port but it did not work :shock: :shock: )

Upload generic_boot20_pc13.bin via Flash Loader Demonstrator:
Image

Image

Upload Blink Sketch:
Image

Image


BrotherV
Wed Dec 02, 2015 2:35 pm
martinayotte wrote:From the “connectivity” picture, we can see that this board is poorly designed since there are at least four R7 on the silkscreen along with three C1. :(

madias
Wed Dec 02, 2015 4:33 pm
Anyway:
Congratulations, BrotherV and happy coding now! :)
About the schematic: I just wanna be sure, that there are two 22R resistors on USB because this would have taken to the next troubles this was my complain about the unreadable schematic (I feel a little bit offended, if it is assumend that I cannot get a stinky ST-Link v2 schematic ;) )

martinayotte
Wed Dec 02, 2015 5:25 pm
madias wrote:Congratulations, BrotherV and happy coding now! :)

RogerClark
Wed Dec 02, 2015 8:44 pm
[quote=”BrotherV”] Image

Hi @BrotherV

I am not sure if you are now using the bootloader of if you are still loading via usb to serial

I you upload the bootloader, you should then be able to connect the PC directly to the USB on the STM32,

However it looks like the board has reset hardware like the Maple mini, so the bootloader you need to use is probably the maple mini version

But i cant read the circuit as it is too blurred

can you tell us which GPIO pin is connected to the 2 transistors which are in the top left of the diagram?

Perhaps its PB1??

But the Maple Mini uses PB9.

I think someone added another Maple mini variant bootloader with using a different pin ( to do the USB reset), but I cant remember which pin that was.

So I may need to add a new bootloader variant to support this board if it uses PB1


zmemw16
Wed Dec 02, 2015 8:53 pm
i’m going to regret this, but why can’t you just waggle the lot?

stephen


RogerClark
Wed Dec 02, 2015 9:02 pm
zmemw16 wrote:i’m going to regret this, but why can’t you just waggle the lot?

stephen


BrotherV
Thu Dec 03, 2015 9:54 am
[quote=”RogerClark”] Hello Roger, it’s connected to PD2. So after I loaded the bootloader should be able to connect the PC directly to the USB on the STM32, Right?

RogerClark
Thu Dec 03, 2015 10:27 am
You need a Bootloader which uses PD2 to reset the USB,

But I just checked and there isnt a version which uses PD2 to cause the USB to re-enumerate

Its fairly easy for me to recompile a new version, but I’m afraid It can’t do it today, as its 21:25 local time, and I’ve just finished work.
i.e I”ve been working for 12 hours as I have a deadline for tomorrow morning

So its too late for me to make you a new bootloader today

Perhaps some other kind person can add you a new build target or perhaps you can make a new target and rebuild it


BrotherV
Thu Dec 03, 2015 3:34 pm
Thanks Roger, hope you are well.
I try my best, I read many topics but how do I change the bootloader for this board? :D
I mean, how do I define the usb reset pin in config.h and how to make a new bin file?!!!!

Thanks


fredbox
Thu Dec 03, 2015 10:56 pm
#elif defined TARGET_ECA
#define HAS_MAPLE_HARDWARE 1
#define LED_BANK GPIOC
#define LED_PIN 13
#define LED_ON_STATE 0
/* USB Disc Pin Setup. USB DISC is PD2 */
#define USB_DISC_BANK GPIOD
#define USB_DISC 2

BrotherV
Fri Dec 04, 2015 6:52 am
fredbox wrote:#elif defined TARGET_ECA
#define HAS_MAPLE_HARDWARE 1
#define LED_BANK GPIOC
#define LED_PIN 13
#define LED_ON_STATE 0
/* USB Disc Pin Setup. USB DISC is PD2 */
#define USB_DISC_BANK GPIOD
#define USB_DISC 2

RogerClark
Fri Dec 04, 2015 10:11 am
Thanks Fredbox

I was going to do it at the weekend

One thing to note is that the board will not automatically reset prior to upload

You will need a new board Variant in order to do that.

Probably your best bet is to copy the Maple RET6 folder and change lines 102 and 103 in board/board.h

/* USB configuration. BOARD_USB_DISC_DEV is the GPIO port containing
* the USB_DISC pin, and BOARD_USB_DISC_BIT is that pin's bit. */
#define BOARD_USB_DISC_DEV GPIOC
#define BOARD_USB_DISC_BIT 12


BrotherV
Fri Dec 04, 2015 12:07 pm
Thanks Roger
Still some questions remaining. I’ll ask after the weekend.
I’ve uploaded bootloader via Demonstrator GUI, but pc13 is not blinking and pc doesn’t recognize stm32 board when I plug in the usb cable.
(I’ve installed maple dfu drivers and changed lines 102 and 103 in board/board.h)

Have a nice weekend


RogerClark
Fri Dec 04, 2015 7:52 pm
Sounds like there is a problem with the firmware @fredbox posted, or possibly the same issue we have with startup on some cheap STM32F103C8 boards

I will try loading the @fredbox firmware onto a “redpill” board that has an led on pc13


fredbox
Fri Dec 04, 2015 8:22 pm
I loaded on a blue pill and confirmed that the led wasn’t flashing.

I had missed editing one line in the makefile, so it was not copying the right binary.
Please try again. PC13 on the blue pill here is blinking away.


Leave a Reply

Your email address will not be published. Required fields are marked *