On MDx targets made the ADC DMA trasfer priority higher than the DMA framebuffer one to avoid ADC overruns due to the ADC DMA transfer being suspended by the framebuffer ones
This commit is contained in:
parent
1f6bfa4cff
commit
85a41a5ca7
|
|
@ -100,10 +100,11 @@ void adc1_init()
|
|||
DMA2_Stream0->PAR = ((uint32_t) &(ADC1->DR));
|
||||
DMA2_Stream0->M0AR = ((uint32_t) &sampleRingBuf);
|
||||
DMA2_Stream0->NDTR = 16;
|
||||
DMA2_Stream0->CR = DMA_SxCR_MSIZE_0
|
||||
| DMA_SxCR_PSIZE_0
|
||||
| DMA_SxCR_MINC
|
||||
| DMA_SxCR_CIRC
|
||||
DMA2_Stream0->CR = DMA_SxCR_MSIZE_0 /* Memory size: 16 bit */
|
||||
| DMA_SxCR_PSIZE_0 /* Peripheral size: 16 bit */
|
||||
| DMA_SxCR_PL_0 /* Medium priority */
|
||||
| DMA_SxCR_MINC /* Increment memory */
|
||||
| DMA_SxCR_CIRC /* Circular mode */
|
||||
| DMA_SxCR_EN;
|
||||
|
||||
/* Finally, start conversion */
|
||||
|
|
|
|||
|
|
@ -388,7 +388,6 @@ void display_renderRows(uint8_t startRow, uint8_t endRow)
|
|||
* sizeof(uint16_t)));
|
||||
DMA2_Stream7->M0AR = LCD_FSMC_ADDR_DATA;
|
||||
DMA2_Stream7->CR = DMA_SxCR_CHSEL /* Channel 7 */
|
||||
| DMA_SxCR_PL_0 /* Medium priority */
|
||||
| DMA_SxCR_PINC /* Increment source pointer */
|
||||
| DMA_SxCR_DIR_1 /* Memory to memory */
|
||||
| DMA_SxCR_TCIE /* Transfer complete interrupt */
|
||||
|
|
|
|||
Loading…
Reference in New Issue