If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

• Resolved

AMC1210: False High Threshold Compare Interrups / Problem with two's complement Data format

Part Number: AMC1210

The AMC1210 is used in a DC Motor Application in Combination with
two AMC1204BDWV.
The Data Format of Sinc Filter is in two's complent and
the value for High-level Threshold Register for Filter Module 1 (0x04)
is straight binary.
I have Interrupts although I have no Load connected. Current is 0A.

T think this problem has to do with with two's complent.
The Comperator can not distinguish small negative values from large positive values.

The Configuratio is like below:
================================
Oversampling of Sinc Filter and Comperator is 8 (Value 0-127)
The both High-level Threshold Register (0x04 , 0x0A) are set to 64 or 0x0040.

CTRL_PAR_REG_1 (0x01)         Value: BIT 4
SINC_FIL_REG_1 (0x02)         Value: BIT8 | BIT2 |  BIT1 |  BIT0 ;
L_THR_REG_1 (0x05)             Value: Bit 8 set

CTRL_PAR_REG_2 (0x07)          Value: BIT4 | BIT3
SINC_FIL_REG_2 (0x08)         Value: BIT8 |  BIT2 |  BIT1 |  BIT0 ;
L_THR_REG_2 (0x0B)             Value: Bit 8 set

CLK_DIV_REG     (0x1B)      Value:  BIT 11  | BIT4;
CTRL_REG          (0x19)      Value:  BIT 13 ;

My idea was to set the Interrupt only with the High Level Threshold
and look at low Level Flag too.
The L_THR_REG_1 +2  (0x05 , 0x0B) set with Values above the Range.
So i can distinguish small negative values from large positive values.

The problem is , that the low level Flag is only active, when the Low level
Interrupt is active.
But then I have Interrupts for ever.

Do You have an workaround ?

• Hi there!

Thank you for your query about the AMC1210! I recall seeing a similar issue in the past, so let me look into this a little and I'll get back to you as soon as possible.

Regards,

Tom

• In reply to Tom Hendrick:

Hi User4315872

I'm still digging into this for you. Apparently the 15-bit value is based on the overall OSR range, with mid scale on the trip level being the approximate 0-current level of the filter. More to come...

Regards,

Tom

• In reply to Tom Hendrick:

Hi User,

Sorry for all the delay here - as noted, the OVC register content is straight binary. The peak values are as shown in Table 9 for the various OSR and SINCx filter level. 'Zero current' would be the mid-scale number (OSR * Filter)/2 - so for an OSR of 16 with a SINC 3 filter, the MAX value is 4096, mid scale (i.e. 0 current) is 2048.

In this scenario, IHT =(COMP_MAX/2)*(1 + Itrip/Imax) →high level threshold and ILT =(COMP_MAX/2)*(1 - Itrip/Imax) →low level threshold. Enter the decimal equivalent values in the threshold registers and let us know how you make out.

Regards,

Tom

• In reply to Tom Hendrick:

Hi Tom,

Thanks a lot for Your Feedback.
I have tested like Your suggestion, but with lower resolution in Sync filter and in Comperator Filter.
I need only an Interrupt, if the Corrent is above the High Level Threshold

My configuration is :
==================
* Sync Filter Oversampling and Comperator Filter Oversampling = 8 (bits 0-2 are set to High)
* Filter Mode is sincfast for both filters.
* Values -128 to 128 for Values
* 0 to 128 for Comperator
* a Value of 128 is 4A in my application.
* Low level Threshold Register is set to 64-25 = 39 (Half Range - Limit)
* High level Threshold Register is set to 64+25 = 89 (Half Range + Limit)

My intension is a current Theshold about 0,75A = Value 25

Now, with this settings I have Interrupts at about 1,5A.
Have I configured something wrong?

Question:
Could I evaluate the the Flag of Low Level Theshold although the Low Level Threshold Interrupt is not
activated?
Do I need to look at Low Level Flag, if I only need a High Level Threshold function?

Thank You.

Hi!

At least you are making some progress! Try thinking of things in percentages. If 100% of your 4A max current, then .75A would be about 18.75% and 1.5A would be 37.5% . Your comparator range is 128, so the upper half of that is 64. In this scenario, 37.5% of 64 is 24, so 64 + 24 = 88 (you set 89) which would be right around 1.5A. Try ~18.75% of 64, which would be 12. Let me know what 64+12 = 76 (0x4C) and 64-12 = 53 (0x34) do for the OC trip levels. You don't need to use the LL interrupt, but I believe you can still evaluate the flag.

Regards,

Tom

• In reply to Tom Hendrick:

Hi Tom,

many thanks for Help.
I Have tested Your Suggestions .
Now, my Application runs with right Current Interrupt Threshold.

This Ticket can be closed.