St nucleo higher adc resolution12/23/2023 ![]() ![]() To set the PWM frequency to 33.3kHz, set period to 20400. Click on add and select the circular mode.Now unfold the Timers menu, go to HRTIM1 and enable Timer A by selecting TA1 output active.Click on add and select ADC1, then in DMA Request Settings set Mode to Circular.In ADC_Regular_ConversionMode set External Trigger Conversion Source to High Resolution Timer Trigger 1 event and External Trigger Conversion Edge to Trigger detection on the rising edge. In ADC_Settings set DMA continuous requests to Enabled In the tab Project Manager>Project set Toolchain/IDE to STM32CubeIDE.Then in the Board selector tab enter the reference of the NUCLEO board (G474RE), select it and you can start the project. When you launch the software select File>New project. This model can be found at the following path : C:/MATLAB/STM32-MAT/stm32/STM32demos/Test/ADC/G431-Nucleo.įirst we need to start a. ioc model called G431_ADC_33_3kHz, It was designed for another board, so it needed to be a bit modified to work on the NUCLEO-g474RE however the Simulink file is compatible, so we will copy it in our project folder. CubeMX settingsįor this tutorial the settings were inspired by the example provided by ST in the. Having the software presented in Getting started downloaded. Hence you will learn here how to set the ADC on Matlab and CubeMX to trigger the measure at a chosen moment of the PWM period. In order to control a power converter we need a fine way to get the measures we want when we want them. ![]()
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |