Author Topic: how can I test a Mini USB STM32F103RCBT6 Leaf Maple Board?  (Read 2243 times)

0 Members and 1 Guest are viewing this topic.

Offline not1xor1Topic starter

  • Frequent Contributor
  • **
  • Posts: 716
  • Country: it
how can I test a Mini USB STM32F103RCBT6 Leaf Maple Board?
« on: January 02, 2018, 05:12:00 pm »
Hi

I've just received a couple of these cheap boards I ordered a while ago:


Since I have no previous experience with this kind of boards, I am looking for some suggestions about how to check if they are fully functional and work correctly.
BTW I'm a linux user.

thanks
 

Offline donotdespisethesnake

  • Super Contributor
  • ***
  • Posts: 1093
  • Country: gb
  • Embedded stuff
Re: how can I test a Mini USB STM32F103RCBT6 Leaf Maple Board?
« Reply #1 on: January 02, 2018, 09:03:32 pm »
Basic test: plug it in, the LED should flash.
Then download Arduino IDE, and the stm32duino core. Write a blinky and download it.
Next level is to toggle all the IOs and check they are toggling with a scope I guess.

I have a few of those boards, they have been decent quality. It's worth doing a visual inspection for bad soldering.
Bob
"All you said is just a bunch of opinions."
 

Offline not1xor1Topic starter

  • Frequent Contributor
  • **
  • Posts: 716
  • Country: it
Re: how can I test a Mini USB STM32F103RCBT6 Leaf Maple Board?
« Reply #2 on: January 03, 2018, 05:21:48 am »
Basic test: plug it in, the LED should flash.
Then download Arduino IDE, and the stm32duino core. Write a blinky and download it.
Next level is to toggle all the IOs and check they are toggling with a scope I guess.

I have a few of those boards, they have been decent quality. It's worth doing a visual inspection for bad soldering.

OK... thanks  :)
 

Offline stj

  • Super Contributor
  • ***
  • Posts: 2155
  • Country: gb
Re: how can I test a Mini USB STM32F103RCBT6 Leaf Maple Board?
« Reply #3 on: January 03, 2018, 02:49:48 pm »
 

Offline not1xor1Topic starter

  • Frequent Contributor
  • **
  • Posts: 716
  • Country: it
Re: how can I test a Mini USB STM32F103RCBT6 Leaf Maple Board?
« Reply #4 on: January 04, 2018, 06:50:39 am »
start here:
http://www.stm32duino.com/

yes ... thanks
I subscribed yesterday...

it looks like I can't load any sketch on the board because of an invalid dfu executable
opening the file with an hex editor I see references to 64 bit libraries but I'm running 32bit linux
 

Offline stj

  • Super Contributor
  • ***
  • Posts: 2155
  • Country: gb
Re: how can I test a Mini USB STM32F103RCBT6 Leaf Maple Board?
« Reply #5 on: January 04, 2018, 01:58:16 pm »
oh shit.

yes, the loader is broken, i also run 64bit Linux and have the boards.
all i can suggest is get a serial convertor - i use these nice ones.
http://www.ebay.co.uk/itm/201704657786

then load the board through the serial-bootloader by setting the boot0 jumper.


or you can try overwriting the tools install, but it didnt work for me.
https://github.com/rogerclarkmelbourne/Arduino_STM32/tree/master/tools
« Last Edit: January 04, 2018, 02:01:42 pm by stj »
 

Offline not1xor1Topic starter

  • Frequent Contributor
  • **
  • Posts: 716
  • Country: it
Re: how can I test a Mini USB STM32F103RCBT6 Leaf Maple Board?
« Reply #6 on: January 05, 2018, 06:05:53 am »
oh shit.

yes, the loader is broken, i also run 64bit Linux and have the boards.
all i can suggest is get a serial convertor - i use these nice ones.
http://www.ebay.co.uk/itm/201704657786

then load the board through the serial-bootloader by setting the boot0 jumper.


or you can try overwriting the tools install, but it didnt work for me.
https://github.com/rogerclarkmelbourne/Arduino_STM32/tree/master/tools

I solved the problem by deleting the dfu executables and rebuilding them from the included source directory.

Then I modified the blink sketch by adding a couple of for loops to vary (loop increase/decrease) led on/off time rate just for a quick check. It looks like the modules work.

But I currently run 32bit kubuntu linux... I've no idea if 64bit may work out of the box, anyway now I'm trying to set-up a new 64bit linux installation, in Virtualbox first...
It's a sort of Franken-desktop-nstein based on xubuntu with various kde pieces and an old kde4 look and feel... :D
 

Offline stj

  • Super Contributor
  • ***
  • Posts: 2155
  • Country: gb
Re: how can I test a Mini USB STM32F103RCBT6 Leaf Maple Board?
« Reply #7 on: January 05, 2018, 03:17:26 pm »
I've no idea if 64bit may work out of the box,

no, it doesnt.
someone on the forum said it was a mix of 32 and 64bit.
whatever the problem, i just used an st-link i had.
 

Offline pigrew

  • Frequent Contributor
  • **
  • Posts: 680
  • Country: us
Re: how can I test a Mini USB STM32F103RCBT6 Leaf Maple Board?
« Reply #8 on: January 05, 2018, 03:57:16 pm »
I don't think there's a great way to test all of the functionality of the MCU at once. The parts that I'd first suspect would be the I/O drivers and the crystal. I'd suggest programming it to output something like a square wave on each pin, and then use a second microcontroller to verify that the voltages are being output. Double-check that the supply current is within reason, as often the ESD diodes are the first thing to go, and even though the IC could continue to work, it'll generally use more current overall.

Finally, use the tester to measure the output frequency of the STM32 while the STM32 is in the mode where it's programmed to use the external clock crystal. Make sure that it's within 75 ppm (or so).

In other words, it's probably too much trouble to "check if they are fully functional", so you probably should just try using them. If they work at all, they're likely fine.

I usually don't use Arduino, but their libraries are generally set up to be very easy to use. But, Arduino does impose some performance limitations. (I've been using SystemWorkbench for STM32, an Eclipse-based IDE. It's fairly complicated but it does include a debugger. My understanding is that the Arduino IDE doesn't come with a debugger.)

As already mentioned, the boards usually don't come with a bootloader, so you'd need to use either an ST/Link or a TTL-level serial port to program them. You may need to set the BOOT0 jumper in order to run the ROM bootloader. Note that with BOOT0 set, your programs may mostly work, but may fail since the bootloader will overwrite bits of your code. Be sure to un-set the BOOT0 jumper before running your software.
« Last Edit: January 05, 2018, 04:39:26 pm by pigrew »
 

Offline not1xor1Topic starter

  • Frequent Contributor
  • **
  • Posts: 716
  • Country: it
Re: how can I test a Mini USB STM32F103RCBT6 Leaf Maple Board?
« Reply #9 on: January 06, 2018, 06:41:51 am »
I don't think there's a great way to test all of the functionality of the MCU at once. The parts that I'd first suspect would be the I/O drivers and the crystal. I'd suggest programming it to output something like a square wave on each pin, and then use a second microcontroller to verify that the voltages are being output. Double-check that the supply current is within reason, as often the ESD diodes are the first thing to go, and even though the IC could continue to work, it'll generally use more current overall.

Finally, use the tester to measure the output frequency of the STM32 while the STM32 is in the mode where it's programmed to use the external clock crystal. Make sure that it's within 75 ppm (or so).

In other words, it's probably too much trouble to "check if they are fully functional", so you probably should just try using them. If they work at all, they're likely fine.

my main problem is lack of time... I needed a really quick way to check if they where DOA or possibly working  :)


I usually don't use Arduino, but their libraries are generally set up to be very easy to use. But, Arduino does impose some performance limitations. (I've been using SystemWorkbench for STM32, an Eclipse-based IDE. It's fairly complicated but it does include a debugger. My understanding is that the Arduino IDE doesn't come with a debugger.)

I have no real experience with microcontrollers so performance limitations won't be a problem at the moment.
If I'm not wrong the boards have 8 channels 12bit ADC (or more... I don't remember, anyway more than enough for my current needs  :) ).
I intend to use one of them for displaying voltage/current/current limit of a dual tracking PSU via a 16x2 characters LCD display. I think it shouldn't be to difficult via the Arduino IDE.

As already mentioned, the boards usually don't come with a bootloader, so you'd need to use either an ST/Link or a TTL-level serial port to program them. You may need to set the BOOT0 jumper in order to run the ROM bootloader. Note that with BOOT0 set, your programs may mostly work, but may fail since the bootloader will overwrite bits of your code. Be sure to un-set the BOOT0 jumper before running your software.

Those boards are maple mini clones.
AFAIK they came with a preloaded bootloader and the led blink sketch. So I had to modify the blinking time to be sure I succeeded in updating the sketch.
 

Offline not1xor1Topic starter

  • Frequent Contributor
  • **
  • Posts: 716
  • Country: it
Re: how can I test a Mini USB STM32F103RCBT6 Leaf Maple Board?
« Reply #10 on: January 06, 2018, 06:46:12 am »
I've no idea if 64bit may work out of the box,

no, it doesnt.
someone on the forum said it was a mix of 32 and 64bit.
whatever the problem, i just used an st-link i had.

I think there is something like an install.sh script in the source directory.
I just ran the commands and got new working executables.
I'll do the same as soon as I install the new 64bit linux.
 

Offline stj

  • Super Contributor
  • ***
  • Posts: 2155
  • Country: gb
Re: how can I test a Mini USB STM32F103RCBT6 Leaf Maple Board?
« Reply #11 on: January 06, 2018, 09:00:53 am »
i think the install script just sets udev rules.
 

Offline not1xor1Topic starter

  • Frequent Contributor
  • **
  • Posts: 716
  • Country: it
Re: how can I test a Mini USB STM32F103RCBT6 Leaf Maple Board?
« Reply #12 on: January 07, 2018, 08:31:32 am »
i think the install script just sets udev rules.

you are right... probably I was still sleeping when I wrote that post yesterday morning  :D
the full path name of the script is:
~/.arduino15/packages/stm32duino/tools/stm32tools/2018.1.3/linux/src/build_dfu-util.sh

what is that 2018.1.3 in the path?  :o
I suppose it is a date... so your path is probably different
I think that is because I got the files via the arduino IDE board manager
the board manager probably uses that to check when there is an updated library version

you can also get the file here:
https://github.com/rogerclarkmelbourne/Arduino_STM32/archive/master.zip
in that case the build_dfu-util.sh script path in the zip file is:
(32bit version) : Arduino_STM32-master/tools/linux/src
(64bit version) : Arduino_STM32-master/tools/linux64/src
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf