mastering-stm32-2nd icon indicating copy to clipboard operation
mastering-stm32-2nd copied to clipboard

Update main-ex3.c

Open felipe-uf opened this issue 8 months ago • 0 comments

I'm reading the book and testing every example using a "BluePill" board which contains an STM32F103 microcontroller. In this example i've found that it didn't work as described in the textbook so i changed the lines of the code to match what is described in the book. For the timer Period i set to generate an event every 1sec as described in the book. If the number of conversions for the ADC is set to 3, every TRGO request will sample three times the temp sensor and set the "convCompleted" variable in the ADC interrupt funciton callback. Setting the number of conversions to 1 will require three TRGO requests since in one request only one sample of the temp sensor will be converted.

felipe-uf avatar Jun 29 '24 19:06 felipe-uf