2015-11-12 01:26 AM
This is a rather complex problem. I have an interrupt routine running under the systick handler with a period of 10mS. Within this I do 4096 reads of ADC3 via DMA2_Channel5, which works fine. Single shot mode
The problem comes when I have data coming in from USART2 via DMA1_Channel6. Occasionally DMA2 fails to complete the transfer, that is, it's counter decrements but does not get to zero.AFAIK I have set up the interrupts with systick having the highest priority, followed by DMA2 and then DMA1Any ideas as to what might be happening? #triage-nurse #stm322015-11-20 04:15 AM
The answer appears to be to change this line
ADC_InitStructure.ADC_OverrunMode = ADC_OverrunMode_Disable; to this ADC_InitStructure.ADC_OverrunMode = ADC_OverrunMode_Enable;