title: Setting sampling frequency for adc in arm cortex m3
body: <p>I am a beginner in the field of microcontroller programming and currently i am working with an arm cortex m3 mcu. I want to program the adc to read voltages at 1khz. The clock of MCU runs at 16Mhz. I am confused as to which of the following two methods i must adopt:
  1. use a delay routine
  2. put mcu to sleep using wfi instruction so that adc samples at 1khz</p>
  
  <p>Can anyone please tell me an optimum solution for this? If wfi is used, how can the subroutine be written??</p>
  
  <p>Thanks in advance.</p>