STM32C0 Workshop Installation Guide and Code To Be Added V1.3 - In-PERSON
STM32C0 Workshop Installation Guide and Code To Be Added V1.3 - In-PERSON
STM32C0 Workshop Installation Guide and Code To Be Added V1.3 - In-PERSON
3)
Workshop: STM32C0: Your next generation 8-bit MCU is a 32-bit
Workshop – Requirements
Important:
You need to have administration rights to be able to install drivers and software and to do the
workshop.
System requirements:
Note: For machines with USB Type C, please bring a Type A to Type C adapter.
Makes sure the USB port you will use for the workshop is enabled.
1
STM32C0 Workshop - Installation Procedure – Introduction:
In the following installation procedure, you are going to install the following
Software/Tools/Libraries that are needed for the Workshop:
1. STM32CubeIDE: version 1.10.1 minimum required, if you have a previous version you
will need to install a new version as explained in this installation procedure.
o Page 4
2. STM32CubeC0: version 1.0.0 minimum required, if you have a previous version you will
need to install a new one as explained in this installation procedure.
o Page 12
3. STM32CubeProgrammer: version 2.10.0 minimum required, if you have a previous
version you will need to install a new version as explained in this installation procedure.
o Page 15
Notes:
1- Some of the versions of the software and libraries on our website might have
newer version than the version seen in the document, please use the latest version
from the links provided in the installation procedure below.
2- The look of our website is changing but the links provided in this document remain
the same.
The entire installation procedure can take several hours (downloading and installing).
2
Questions and support ahead of the workshop
1. If you have issues during the software download and install, please contact ST by
entering an Online Support Request at: https://community.st.com/s/onlinesupport?
o=ws&tabset-08cae=2
to help resolve the issue.
2. When entering the support request, in the Subject field please fill with:
“STM32C0: Your next generation 8-bit MCU is a 32-bit”
3. To ensure your request is quickly routed to the correct support team, please indicate the
Workshop Request Type, Technical or Non-Technical, that best describes your question.
3
STM32C0 Workshop - Installation Procedure
4
Click on “Get Software” button:
Click on:
5
There are 3 ways of getting the software:
6
If you have an ST account, click on:
If you don’t have an account and don’t want to create one, fill in the information below:
7
Note: you may see a newer version in your case than the screenshot above.
Press “Next”:
8
Press “I agree”:
Press “Next”:
9
Press: “Install”
10
Press “Finish”
11
2- STM32CubeC0: Install STM32Cube MCU Package for STM32C0 series
Click Launch:
12
Note: For those behind a corporate firewall or having issue with installing the Cube Library from
the internet, you can use “From local” to do an offline install of the STM32CubeC0 Library.
Click on Refresh:
Under STM32C0, expand then check the latest STM32 MCU Package for STM32C0 and click
“Install”:
13
Agree on the terms of this license agreement, by selecting “I have read, and I agree to the the
terms of this license agreement” and then press Finish.
Once installed it should look like this and you can press “Close”
Note: In your system it might show a newer version depending on what latest version is
available
14
3 - STM32CubeProg: STM32CubeProgrammer software for programming
STM32 products
Click on:
Please get the latest software version available that will be accessible by clicking on:
15
Click on:
16
17
There are 3 ways of getting the software:
If you don’t have an account and don’t want to create one, fill in the information below:
Then click:
Save the file at a location of your choice:
Note: you may see a newer version in your case than the screenshot above.
18
Right Click on SetupSTM32CubeProgrammer-x.x.x.exe and Run as administrator
Press Next:
19
Press Next:
20
Important note: If you have a previous version, it will be overwritten if you keep the default path.
So, if you want to keep your previous version you will need to install the new version at a
different directory. But for the workshop make sure to use the correct version (version that we
are installing here).
21
Press OK to create the Directory if the directory does not exist:
22
Press Finish:
23
Press Done:
24
4 – Code to be added during the workshop:
The code below are the changes we are going to do during the course of the workshop, and you
will be guided in step by step. This will help you so you do not have to retype everything since
you will be able simply to copy-paste.
HAL_GPIO_TogglePin(LED_GPIO_Port, LED_Pin);
HAL_Delay(100);
HAL_TIM_PWM_Start(&htim1, TIM_CHANNEL_1);
uint8_t PC13_flag = 0;
//////////////////////
25
STM32C0 Workshop Lab 4: Printf debugging using UART
in main.c:
////////////////////////////
while (1)
{
printf("** Hello World ** \n\r");
HAL_Delay(1000);
/* USER CODE END WHILE */
/////////////////////////////
LL_GPIO_TogglePin(GPIOA, LL_GPIO_PIN_5);
// Delay 100 ms
LL_mDelay(100);
26
STM32C0 Workshop Lab 6: ADC + DMA + TIM
in main.c:
...
...
27
in main.h:
in stm32c0xx_it.c:
in STM32C031C6TX_FLASH.ld:
*/Drivers/*(.text*)
*main.o(.text.MX_GPIO_Init)
*main.o(.text.MX_USART2_UART_Init)
*main.o(.text.USART_CharReception_Callback)
28
Appendix A: STM32CubeC0 Firmware Library Offline Activation
Now select a Workspace, you can keep the default one and click Launch:
29
Now Go to Help -> Manage Embedded Software Packages
30
Select “en.stm32cubec0-v1-0-0.zip” you have copied form the flash drive
31
Now you should see the STM32CubeC0 Library installed properly with the green square as
seen below:
32