Thursday, June 14, 2012

MicroExplorer from STMicroelectronics - STM32 visual configuration tool

It's often a pain to properly connect different peripherials to an MCU, especially if the latter has rich remapping capabilities (that is definitely the case for STM32). I used to use MS Excel for playing with configurations for PICs but as I just started with STM32 it would be a nightmare to go through all the remapping info in Reference Manual and try to not assign the same pin for all the devices you want to connect your MCU to.

Luckily ST created a graphical tool for people like me.
It's called MicroExplorer and can be downloaded from here: http://www.st.com/internet/evalboard/product/251717.jsp. There's a windows binary, plug-in for Eclipse and a bunch of manuals. You go and choose from drop-down menues the peripherials you need to use in your project and the tool automatically shows conflicting peripherials claiming the same pin.

Uploaded with ImageShack.us

You can also right-click pins and manually choose their role or render them as different inputs or outputs. When you are done with the configuration, you may generate a report in PDF or TXT. TXT, for example looks like this:


Configuration Undefined
Date 06/14/2012
MCU STM32F051R8Tx


PERIPHERALS MODES REMAP FUNCTIONS PINS
USART1 Asynchronous 0 USART1_RX PA10
USART1 Asynchronous 1 USART1_TX PB6
TSC G1_IO1 0 TSC_G1_IO1 PA0
TSC G2_IO1 0 TSC_G2_IO1 PA4
TSC G3_IO1 0 TSC_G3_IO1 PC5
TSC G4_IO1 0 TSC_G4_IO1 PA9


POS PIN FUNCTION
14 PA0 TSC_G1_IO1
20 PA4 TSC_G2_IO1
25 PC5 TSC_G3_IO1
42 PA9 TSC_G4_IO1
43 PA10 USART1_RX
58 PB6 USART1_TX

The menue gives a hint that in the future it will also be possible to generate code for your project, but this feature is not currently implemented.
Hint 1: If you use this tool for configuring one of ST evaluation boards do not forget to enable peripherial which is occupyed by hardware on the eval board, such as two-wire serial debug (it's in SYS group). Otherwise you may endup with having your LEDs illuminating your debugging procedure, not your program run :-)
Hint 2: Manually selecting an input/output role for a pin (such as Open Drain Output) will prevent you from choosing a peripherial in the drop-down menue. The utility will not tell you that there's a conflict - it will just not allow you to choose a peripherial. So my advise is - select all the peripherials first and then start playing with inputs/outputs manually.


2 comments:

Unknown said...
This comment has been removed by a blog administrator.
dccharacter said...

Hi there! This post don't even have an "XBee" word in it :-)