Showing results for 
Search instead for 
Did you mean: 

ADC multichannel using DMA can't trigger Analog watchdog interrupt correctly

Associate III


I'm using stm32wb55 MCU.

ADC is running in continuous mode with 6 channels using DMA for the results. I want to use analog watchdog interrupt on just 1 channel that is on rank 2.

I have 2 problems, first the interrupts occured only for the channel in rank 1. I tried replacing the channel in rank 1 and the watchdog always considered only rank 1 channel. Second, I'm using 12 bits resolution and I checked RES bits are set to 00, but from what I tested it looks like the value triggers the watchdog is right shifted by 4 bits, for example if data received is 2116(0x844), low threshold needs to be set to more than 132(0x84) to trigger the interrupt.

Does anyone had any of these problems or have any idea how to solve it?

Any help will be appreciated.