STM32C0 workshop - 11 DMA, DMAMUX - transfers synchronization
Channel: STMicroelectronics
Date: 22/06/2023

The objective of this lab is to demonstrate DMA and DMAMUX peripheral and its capability to synchronize couple of actions (reconfiguration of the timer and USART data transfer) without code intervention.
In this example we will control Green LED by Timer1 working in PWM mode (constant frequency, variable duty cycle). Duty cycle of Timer1 will be modified by DMAMUX on each blue button press.
Additionally each DMA transfer tiggered by blue button press will trigger another DMA transfer to USART2 which will be visible on the terminal application.

Who should attend this course?
- Engineers looking for a general purpose microcontroller for their embedded applications
- Engineers who wish to better understand the STM32C0's innovative architecture and embedded smart peripherals
- Engineers looking to design applications using a user-friendly development ecosystem

Prerequisites:
- NUCLEO-C031C6 board
- type A to type B micro USB cable
- Laptop PC running Windows® 7, 8, 10 or 11 with administrator rights and with preinstalled software from below link:

Complete list of prerequisites is available within the below link:
https://drive.google.com/file/d/1EtLCgpKx2ssiloFf9j6PVNb_ixvSvIpn/view?usp=share_link

Code to be added:

in main.c:

within initialization part:

/* USER CODE BEGIN PV */
uint32_t Pulses[10] = {0,10,20,30,40,50,60,70,80,90};
uint8_t TX_Data[10][9]={"DC  0%\r\n","DC 10%\r\n",
     "DC 20%\r\n","DC 30%\r\n",
     "DC 40%\r\n","DC 50%\r\n",
     "DC 60%\r\n","DC 70%\r\n",
     "DC 80%\r\n","DC 90%\r\n"};

and further within main():

/* USER CODE BEGIN 2 */
 HAL_UART_Transmit_DMA(&huart2, (uint8_t *)TX_Data, sizeof(TX_Data));
 HAL_TIM_PWM_Start_DMA(&htim1, TIM_CHANNEL_1, Pulses, 10);


In case of any questions, suggestions, feel free to contact us at our forum at:
https://community.st.com

Please share with us your feedback on this MOOC using anonymous survey at:
https://www.surveymonkey.com/r/STM32C0_WS_MOOC