adc.c corrupted when using DMA.
Any idea how to avoid / fix this behavior?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-07-05 12:55 PM
- #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;
- Labels:
-
ADC
-
DMA
-
STM32CubeIDE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-07-05 5:52 PM
I suspect #n#t to somehow be replaced for \n\t. Not sure how that's happening. What OS? I'm going to guess Mac.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-07-06 7:48 PM
Windows 10
I re-installed STM32CubeIDE - the error is persistent - only adc.c and only after I enable dma...
I will try to dig out the Eclipse logs and also java logs.
It compiles OK after replacing all #n and #t with space
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-07-06 8:33 PM
If it's repeatable, attach the IOC file. Otherwise, you're probably on your own. Maybe it's due to a rogue find/replace instance.
