2016-05-02 02:03 AM
hi
I have problem with adc sampling and controller calculating at each period of sampling(each sampling time) .I fond this from st,com . I have some questions : 1.what is the meaning of first line exactly and how I can implement it? 2. How can we calculate the time of each code like table? 3. How can we calculate (or set) adc sampling time like after table(57us)? I use stm32f103ret6. picture attached2016-05-02 05:50 AM
[DEAD LINK /public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/grid%20connected%20inverter%20code%20problems&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B&TopicsView=https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/AllItems.aspx¤tviews=21]Duplicate Thread
Cite the document this was taken from, I've got better things to do that try and track things down and put them in some sort of context.The machine is synchronous, the timers share the same clock source as everything else, you can configure the timers to generate period signals, and control phase, etc. The ADC can be set up to trigger from specific timers and channels, and those too can be configured to fire at specific phase angles.Review the reference manual with respect to the timer modes and configurations, and the ADC section for the triggering mechanisms.If you need to know how long your code takes to execute, you can profile it using timers or cycle counters, or you can review the assembler code attributing cycle counts to each instruction, and IRQ entry/exit.