STM32F103RCT6 minimum developement ebay board

swanepoeljan
Sun Jul 08, 2018 8:14 am
Hi,

Last week I bough one of these boards from ebay:

STM32F103RCT6(EbayBlueAndYellow).jpg
STM32F103RCT6(EbayBlueAndYellow).jpg (60.2 KiB) Viewed 581 times

hobbya
Sun Jul 08, 2018 8:18 am
Just a guess: Arduino blink sketch drives LED by Logical High whilst it is Logical Low for STM32 boards.

swanepoeljan
Sun Jul 08, 2018 8:25 am
But it should still blink, the on and off periods would just be inverted…

hobbya
Sun Jul 08, 2018 8:32 am
Ha yes you’re right. Have you verified again the connection of the LED? And did you set Boot0 back to GND after the upload?

swanepoeljan
Sun Jul 08, 2018 9:04 am
[hobbya – Sun Jul 08, 2018 8:32 am] –
Have you verified again the connection of the LED?

I don’t have a schematic for the board but following the traces the LED seems to be connected to PB11. I also probed PB11 with my oscilloscope while the program was suppose to be running and could not see the pin toggle.

[hobbya – Sun Jul 08, 2018 8:32 am] –
did you set Boot0 back to GND after the upload?

Jip, initially I also thought I forgot it but since then I have tried it numerous times but no luck. As a test I even tried to program without setting boot0 but got a programming error.

Another thing I just remembered was that when I received the board and powered it up the first time, the LED was blinking. Maybe this was a program they uploaded as a test after assembling the board. If this is the case then I suppose the crystal and the rest of the hardware must be working (or the program used an internal oscillator, but probably unlikely).


hobbya
Sun Jul 08, 2018 9:16 am
Perhaps you can retry by connecting another LED at a known IO pin.

hobbya
Sun Jul 08, 2018 9:34 am
I managed to find the data pack for you although some of the filenames are in Chinese. The LED is indeed on PB11. The package also contains a hex file but I am unsure if it is the program the factory flashed prior to shipment.

https://drive.google.com/open?id=1v8-cw … GozMp8_h_J


swanepoeljan
Sun Jul 08, 2018 10:19 am
Awesome, thanks!! How did you find it, I was also looking around but couldn’t find anything!
Anyway, so I flashed the hex file and the LED is now blinking again like when I received it the first time!

Now the questions is why can’t I get it to work using STM32duino… :?


hobbya
Sun Jul 08, 2018 10:50 am
I searched the same board on Taobao. Some sellers post the document links but some will only provide the links after purchase. Well at least you can be sure the board is functional. I believe you can sort it out pretty soon.

swanepoeljan
Sun Jul 08, 2018 8:37 pm
Thinking again that it might be the crystal. I compiled and flashed the following code:

#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/gpio.h>

int main (void) {
// Set clock to 72MHz using external 8MHz crystal
//rcc_clock_setup_in_hse_8mhz_out_72mhz();

rcc_periph_clock_enable(RCC_GPIOB);
gpio_set_mode(GPIOB, GPIO_MODE_OUTPUT_2_MHZ,
GPIO_CNF_OUTPUT_PUSHPULL, GPIO11);

for (;;) {
gpio_toggle(GPIOB, GPIO11);

// create a small delay by looping for a while
for (int i = 0; i < 1000000; ++i) __asm("");
}
}


hobbya
Mon Jul 09, 2018 5:38 am
I am not familiar with libopencm3. However it seems your code is pretty common in the demo codes found on the web.

As you have an oscilloscope, will you probe the crytsal output when you comment out ” rcc_clock_setup_in_hse_8mhz_out_72mhz(); ” ?

Can you see if it is oscillating after loading the Arduino sktech or the factory hex file?

Lastly, is the crystal a 8Mhz but not some other frequency?

Sorry for not being able to help further.


swanepoeljan
Mon Jul 09, 2018 7:17 pm
So tonight I hooked up a Blue Pill to my scope and could see the 8MHz clock on pin6. Then tried the same with this board, using the supplied hex file and then the libopencm3 code with clock enabled, but could not see the clock in either case. I heated the pads for the crystal and caps with my iron in case there were a bad connection but it also did not help.

I guess it’s safe to say that the crystal is broken and now I just have to decided if I will try to fix it or just buy a new board.

Thanks for all your help! If I make any further progress with the board I will post an update here…


edogaldo
Mon Jul 09, 2018 7:56 pm
Check for possible shorts between the crystal pins.

Cheers, E.


Leave a Reply

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