In the previous tutorials, I have shown how to use the simple GPIO and external interrupt of the STM32. Since these peripherals are connected with external pins, we can visually observe how it works through some LEDs of the Discovery kit. Therefore, it is very easy to know whether our code is working correctly or not. However, when you are playing with some kinds of internal peripherals such as Timer/Counter, UART,… with types of data are not bit anymore but byte or integer or float, you will need something else to diagnose that data. Typically, the programming environment like Keil or IAR provides us a debugging tool to debug those kinds of data in real time but I found they are not so convenient and user-friendly at all. So, to prepare for our next tutorials, which will be more about internal peripherals, I am going to introduce you to the STM Studio from STMicroelectronics.

Install the STM Studio

The current version of the STM Studio from ST at the time of this post is 3.4. You can download it directly from ST website from this link: http://www.st.com/web/en/catalog/tools/PF251373

Or a mirror link here: STM Studio

Once you install the program, you will see this interface

STM Studio

STM Studio

 Monitoring and Visualization your data

To make it simple, I will use the code from the GPIO button tutorial to demonstrate how to config the STM Studio to connect and read variables from your STM32F0 kit in real time. The program should be like this:

  • The User button will be used to increase a variable (‘long’ type) internally.
  • Connect the kit with STM Studio using onboard ST-Link
  • Show the variable in STM Studio in different types including graphs and table.

You can watch the GPIO tutorial again and replace the code in the clip with the following code:

This part of code in the clip:

Need to be replaced with:

As you can see, we replace the LED toggle part with the increment calculation for variable ‘i’, which has been declared as ‘long’ type in the beginning of the program. Whenever we press the User button, this ‘i’ will be increase by 1 and we are gonna monitor this using STM Studio. Please watch and follow the clip below to know how to use the STM Studio to connect and read variables from your STM32F0 kit.

Next tutorial, I will show how to use the Timer peripheral of the STM32F0 as a timer to create a time base interrupt, generate PWM signal and as a counter to count the input signal, encoder signal… Stay tuned !

 

STM Studio
STM Studio
stmstudio.zip
Version: 3.04
9.9 MiB
605 Downloads
Details

15 Thoughts on “STM Studio: Variables monitoring and visualization tool for STM32

  1. Iran Espinoza on 26/04/2015 at 8:46 AM said:

    Hi! before all, i want to congratulate you, for all your efforts! it works very well for me! i In the begin, was so confused with arm… and with your help, i finally do the: hello world with stm32f0! i´ll have be waiting the next tutorial (how to use the Timer peripheral of the STM32F0 as a timer)! and next, and next…! greetings!

  2. Iran Espinoza on 26/05/2015 at 6:29 AM said:

    hi Le Tan Phuc, you know where I can continue learning the learning method you use in these examples? you see, that arm is more complex than other microcontrollers, and as you mentioned anteriorme, I liked your way of teaching.I would continue there, as I am currently stalled.

  3. Iran Espinoza on 26/05/2015 at 6:43 AM said:

    Sorry for the bad writting, here it is:
    hi Le Tan Phuc, you know where I can continue learning the learning method you use in these examples? you see, that arm is more complex than other microcontrollers, and as I said earlier, I liked your way of teaching.I would continue there, as I am currently stalled.

    • Le Tan Phuc on 28/05/2015 at 4:47 PM said:

      Hi, I’m quite busy those days with my project so that I couldn’t update any new tutorial here. As you know, this ARM is not easy for beginners and usually they don’t know where to start. I was also in the same situation at first and also followed others methods. I’m still discovering the new CubeMX library for STM32 and also got stuck sometimes. So my method for learning this new platform is taking advantage of Source Insight to discover all functions in the library of the peripheral you want to use. Besides, datasheet (reference manual) is compulsory for checking the relation between the function in the library and the peripheral’s registers. In case you haven’t downloaded it: http://www.st.com/web/en/resource/technical/document/reference_manual/DM00031936.pdf . Last but not least, you will not be able to discover how it works if you don’t try using it.
      Anyway, which part are you stucking now ?

      • Iran Espinoza on 10/06/2015 at 3:24 AM said:

        Hi Le Tan Phuc, excuse me for the late answer, I’m stuck on various things, but as you comment me, the best way is to test. Look, I developed this device: https://www.youtube.com/watch?v=fp5e6IgMYG0, but someone stole my laptop, and does not backup my projects … I did it with a pic 18F2550 overclocked, so I want to change to arm. I will follow your advice, my pic projects was made with niple (similar to flowcode), but now want to go back to c. greetings and I keep hoping your new tutorial!

        • Le Tan Phuc on 16/06/2015 at 10:57 PM said:

          Sorry but it’s not so clear in your video and I still don’t get it, can you explain more 🙂

  4. Iran Espinoza on 02/07/2015 at 8:32 AM said:

    Hi Le Tan Phuc, i have found one little part that i want to do with stm32! you can see here: http://www.artekit.eu/vga-output-using-a-36-pin-stm32/, that i want to do with our stm32f0 discovery board, the resolution vga can be 640×480, i had done it with pic 18f2550 (but remember, someone stole my laptop…), showing a little counter, when my uC detect 0.7volts or more, in one pin, i continue the program to do another things. i hope don´t make you dizzy, jeje. Greetings!

  5. Michael on 22/10/2015 at 5:40 AM said:

    Hi,
    I tried to run STM Studio, but unfortunately it doesn’t work.
    It says:”javaw.exe is missing”, but i have already installed Java on my machine and other java based programs such as eclipse work as well.
    Could you give me a hint why it doesn’t work.
    Thanks
    Michael

    • Le Tan Phuc on 22/10/2015 at 9:04 AM said:

      Hi, did you try installing the newest version from ST (v3.4) ? what OS are you using ? I haven’t experienced this problem before when installing this on both x86 and x64, win7 and win8 so I’m not sure why.

    • Sukru on 14/12/2015 at 11:45 PM said:

      Hey michealla could you find the solution becase i have same problems nowadays and i cant find any solution.Please help me !

    • weibo wu on 16/12/2015 at 7:24 PM said:

      you can open the directory where the stm studio installed, find the stm**.jar,hit it hardly! hehe

  6. Hiep on 09/11/2015 at 4:43 AM said:

    Chào anh. Cả tháng nay em mò về con arm, em thấy những video của anh rất hay. Nó giúp cho em rất nhiều. Mong anh có thêm nhiều video nữa để đàn em như chúng em học hỏi thêm nhiều kinh nghiệm. Cảm ơn anh. <3

  7. Dung on 14/11/2015 at 11:05 PM said:

    good job

  8. adi veket on 19/05/2016 at 8:47 PM said:

    nice , thanks
    very good job

Leave a Reply

Post Navigation