Skip to main content
EZamo.1
Associate III
February 17, 2020
Question

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

  • February 17, 2020
  • 2 replies
  • 617 views

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.

This topic has been closed for replies.

2 replies

waclawek.jan
Super User
February 17, 2020

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

JW

EZamo.1
EZamo.1Author
Associate III
February 18, 2020

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?

berendi
Principal
February 18, 2020

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?