cancel
Showing results for 
Search instead for 
Did you mean: 

Analog Watchdog to trigger on offset adc value

KLW
Associate

I am applying 4 offset to 4 adc channels and calculating the analog watchdog high threshold based on a threshold above the highest adc channel. The purpose of the adc offsets is to equalize the channels readings, such that the adc watchdog high threshold will be the same delta above any of the four channels. The issue I am having is the analog watchdog is triggering on the non-offset values. For instance, if my 4th channel is 0.1V above the 1st channel, before an offset is applied, and I set the watchdog to 0.1V, I get a constant trigger. With the offset applied, the 1st channel equals the 4th channel, but the watchdog is trigger based on the pre-offset values. To summarize, it seems that the analog watchdog triggers on adc readings before the offset is applied. Is there a way to get it to trigger post offset?

1 ACCEPTED SOLUTION

Accepted Solutions
RBENF.1
ST Employee

Hello @KLW​,

You are right, watchdog comparison occurs before any offset is applied. It is due to the fact that offset compensation can generate a signed data format, but the analog watchdog does not have notion of negative nor positive. The only "offset" that can be applied is through the threshold value itself.

Regards,

Ryan

When your question is answered, please close this topic by choosing Select as Best. This will help other users find that answer faster.

View solution in original post

3 REPLIES 3
RBENF.1
ST Employee

Hello @KLW​,

Can you please indicate which STM32 product you are using ?

Regards,

Ryan

KLW
Associate

Hello,

I am using the STMWB55CE chip. Firmware is developed in cubeIDE.

My testing indicates that the analog watchdog is monitoring values prior to an offset being applied. I am using the DMA to transfer values to a circular buffer, and the offsets are being applied properly. I record the values to non-volatile memory once the analog watchdog triggers a value, and I can see that none of the values are actually above the high threshold. This indicates that the watchdog is triggering on the values before an offset is applied.

My main question is, can I get the analog watchdog to monitor the values after an adc offset is applied?

RBENF.1
ST Employee

Hello @KLW​,

You are right, watchdog comparison occurs before any offset is applied. It is due to the fact that offset compensation can generate a signed data format, but the analog watchdog does not have notion of negative nor positive. The only "offset" that can be applied is through the threshold value itself.

Regards,

Ryan

When your question is answered, please close this topic by choosing Select as Best. This will help other users find that answer faster.