cancel
Showing results for 
Search instead for 
Did you mean: 

Why does starting SPI1/DMA1ch2 cause ADC3/BDMAch0 to stop?

EZamo.1
Associate III

The HAL_ADC_ConvCpltCallback interrupts stop firing the moment I start SPI1:

SET_BIT(hspi->Instance->CR1, SPI_CR1_CSTART);

If I clear spi1's CR1 Start, I get the adc complete interrupts firing again.

Since they use different peripherals, not sure how once could affect the other. Sp1 is configured in circular mode, Master Rx Only using dma1 ch2. Adc3 is configured for continuous scan using bdma ch0.

3 REPLIES 3

Resource exhaustion? How long and how often does the SPI-DMA ISR run?

JW

EZamo.1
Associate III

spi1 runs in circular mode, so it's always active, but I don't have any callback for it. the adc3 does have a callback for when it completes a scan. the interesting thing is that once sp1 is running I never get an adc3 callback.. if it was some kind of resource exhaustion, i would think it would fire less frequently. But since these are completely separate peripherals, each on their own domain, are there restrictions as to which peripherals can be used simultaneously?

Is the ADC still working, i.e. can you observe its data register changing from the main program?

Is BDMA still copying ADC3->DR to memory?