edgetx icon indicating copy to clipboard operation
edgetx copied to clipboard

Reduce ADC noise

Open zyren opened this issue 1 year ago • 9 comments

This is an experimental pull request. Another engineer told me: After he consulted a lot of relevant information, including ST official information, he obtained a description of FLASH_PrefetchBufferCmd. Try turning it off with FLASH_PrefetchBufferCmd(DISABLE), and by observation, it does reduce the magnitude of the joystick noise. The indirect influence factors of FLASH_PrefetchBufferCmd on ADC noise are as follows:

When FLASH_PrefetchBufferCmd is enabled, the noise of the ADC increases, which may suggest some indirect effects.

Here are some possibilities:

  1. System Noise: Enabling the prefetch instruction buffer may increase the system's power consumption, introduce more power supply noise, or affect the CPU's handling time for ADC interrupts. This could indirectly affect the noise level of the ADC, leading to an increase in the LSB value..

  2. Interrupt Delay: The prefetch instruction buffer could potentially cause a delay in the CPU when handling ADC interrupts, which may affect the timing of ADC reads and possibly lead to increased noise.

  3. Impact of System Clock: The prefetch instruction buffer could potentially have an effect on the system clock. If the ADC sampling time is correlated with these clock signals, it could possibly lead to increased noise.

zyren avatar Jun 03 '23 04:06 zyren