cancel
Showing results for 
Search instead for 
Did you mean: 

ADC DMA and injected mode

Hans Jonker
Associate III
Posted on May 30, 2018 at 09:43

Hi all,

I am using a board with and STM32L476. ADC 1 is used in software triggered mode, with DMA (8 channels). (So firmware dictates when to start conversion, DMA interrupt tells the firmware to process the data.) This one works fine.

ADC2 is ALSO used in software triggered mode with DMA (5 channels), BUT also uses timer triggered injected mode for a single channel. (I want that channel to be sampled on a spot on time base).

This worked under the CMX generated code with firmware package V1.7.0, but is broken using V1.11.0:

When I use ADC2 ONLY using the software triggered DMA part, it works well.

When I use ADC2 ONLY using the injected mode part (I just don't run the trigger), it works well.

When I use the combination of the 2, I get 1 DMA interrupt, and then it's stuck.

The injected channel is 16, so cannot be moved to ADC3, and not all of the 5 DMA channels can be selected for ADC3...

As this mechanism worked using V1.7.0, I can only but presume something has been broken in V1.11.0, but I find it hard to find the root cause...

Anybody with a suggestion?

0 REPLIES 0