adc.c corrupted when using DMA. Any idea how to avoid / fix this behavior?
- #n and/or #t are added in front of each line.
- It happen twice in 2 different project / workspaces
- Have to restart eclipse in order to start behaving "normally"
- It happens after allocating DMA channel to ADC
- Deleting the DMA channel fixes the file / errors
#n
/* ADC1 init function */
void MX_ADC1_Init(void)
{
#n
#t/* USER CODE BEGIN ADC1_Init 0 */
#n
#t/* USER CODE END ADC1_Init 0 */
#n
#tADC_MultiModeTypeDef multimode = {0};
#tADC_ChannelConfTypeDef sConfig = {0};
#n
#t/* USER CODE BEGIN ADC1_Init 1 */
#n
#t/* USER CODE END ADC1_Init 1 */
#t/** Common config#n#t*/
#thadc1.Instance = ADC1;
#thadc1.Init.ClockPrescaler = ADC_CLOCK_SYNC_PCLK_DIV4;
#thadc1.Init.Resolution = ADC_RESOLUTION_12B;
#thadc1.Init.DataAlign = ADC_DATAALIGN_RIGHT;
#thadc1.Init.GainCompensation = 0;
#thadc1.Init.ScanConvMode = ADC_SCAN_DISABLE;
#thadc1.Init.EOCSelection = ADC_EOC_SINGLE_CONV;
#thadc1.Init.LowPowerAutoWait = DISABLE;
#thadc1.Init.ContinuousConvMode = ENABLE;
#thadc1.Init.NbrOfConversion = 1;
#thadc1.Init.DiscontinuousConvMode = DISABLE;
#thadc1.Init.ExternalTrigConv = ADC_SOFTWARE_START;
#thadc1.Init.ExternalTrigConvEdge = ADC_EXTERNALTRIGCONVEDGE_NONE;
#thadc1.Init.DMAContinuousRequests = ENABLE;
#thadc1.Init.Overrun = ADC_OVR_DATA_OVERWRITTEN;
