how can I test a Mini USB STM32F103RCBT6  Leaf Maple Board? - Page 1
Forum section: electronics / general

author: not1xor1
author_rank: Frequent Contributor
timestamp: January 02, 2018, 05:12:00 pm
content: HiI've just received a couple ofthese 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

author: donotdespisethesnake
author_rank: Super Contributor
timestamp: January 02, 2018, 09:03:32 pm
content: 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.

author: not1xor1
author_rank: Frequent Contributor
timestamp: January 03, 2018, 05:21:48 am
content: Quote from: donotdespisethesnake on January 02, 2018, 09:03:32 pmOK... thanks

author: stj
author_rank: Super Contributor
timestamp: January 03, 2018, 02:49:48 pm
content: start here:http://www.stm32duino.com/

author: not1xor1
author_rank: Frequent Contributor
timestamp: January 04, 2018, 06:50:39 am
content: Quote from: stj on January 03, 2018, 02:49:48 pmyes ... thanksI subscribed yesterday...it looks like I can't load any sketch on the board because of an invalid dfu executableopening the file with an hex editor I see references to 64 bit libraries but I'm running 32bit linux

author: stj
author_rank: Super Contributor
timestamp: January 04, 2018, 01:58:16 pm
content: 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/201704657786then 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

author: not1xor1
author_rank: Frequent Contributor
timestamp: January 05, 2018, 06:05:53 am
content: Quote from: stj on January 04, 2018, 01:58:16 pmI 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...

author: stj
author_rank: Super Contributor
timestamp: January 05, 2018, 03:17:26 pm
content: Quote from: not1xor1 on January 05, 2018, 06:05:53 amno, 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.

author: pigrew
author_rank: Frequent Contributor
timestamp: January 05, 2018, 03:57:16 pm
content: 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.

author: not1xor1
author_rank: Frequent Contributor
timestamp: January 06, 2018, 06:41:51 am
content: Quote from: pigrew on January 05, 2018, 03:57:16 pmmy main problem is lack of time... I needed a really quick way to check if they where DOA or possibly workingQuote from: pigrew on January 05, 2018, 03:57:16 pmI 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.Quote from: pigrew on January 05, 2018, 03:57:16 pmThose 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.

author: not1xor1
author_rank: Frequent Contributor
timestamp: January 06, 2018, 06:46:12 am
content: Quote from: stj on January 05, 2018, 03:17:26 pmI 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.

author: stj
author_rank: Super Contributor
timestamp: January 06, 2018, 09:00:53 am
content: i think the install script just sets udev rules.

author: not1xor1
author_rank: Frequent Contributor
timestamp: January 07, 2018, 08:31:32 am
content: Quote from: stj on January 06, 2018, 09:00:53 amyou are right... probably I was still sleeping when I wrote that post yesterday morningthe full path name of the script is:~/.arduino15/packages/stm32duino/tools/stm32tools/2018.1.3/linux/src/build_dfu-util.shwhat is that 2018.1.3 in the path?I suppose it is a date... so your path is probably differentI think that is because I got the files via the arduino IDE board managerthe board manager probably uses that to check when there is an updated library versionyou can also get the file here:https://github.com/rogerclarkmelbourne/Arduino_STM32/archive/master.zipin 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