Resolution AFE MKM34Z256

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Resolution AFE MKM34Z256

1,227件の閲覧回数
ioilabs
Contributor I

Hey,

I want to understand what is the exact resolution of the AFE. I use TWR-KM34Z75M. For my minds, as I use Adc 24 bits resolution is : quantum = Vref/(2**n-1) with Vref = 1.2V et n=24.

In Sdk example "afe_interrupt", on Vref initialization function VrefH (1.2V ) and VrefL (0.4V) are initialized. Why VrefL is it needed ? Exact tension resolution is it Vref = VrefH - VrefL = 0.8V ?

void APP_VREF_Config(void)
{
    vref_config_t config;

    /* Get vref default configure */
    /*
     * config.bufferMode = kVREF_ModeHighPowerBuffer;
     * config.bufferMode = kVREF_ModeTightRegulationBuffer;
     * config.enableExternalVoltRef = false;
     * config.enableLowRef = false;
     */
    VREF_GetDefaultConfig(&config);
    /* Enable low reference volt */
    config.enableLowRef = true;


    /* Init vref */
    VREF_Init(VREF, &config);


    /* Vref set trim reference */
    VREF_SetLowReferenceTrimVal(VREF, 3U);


    /* Vref set trim, this value will not be the same with every boards */
    VREF_SetTrimVal(VREF, DEMO_AFE_VREF_TRIM);
}

Can you give me exact way to convert Adc value to real value please ?

Thanks for advance,

IOI Labs

ラベル(1)
タグ(2)
0 件の賞賛
2 返答(返信)

775件の閲覧回数
Kris_Ke
Contributor III

Maybe others will also have the same problem, update the following reference calculation formula for others' reference.

 

50mV would be represented as (838,860) which is (0000 1100 1100 1100 1100 1100) in binary or (C CCCC) in Hex.

To represent -50mV you need the two’s complement of this number (-838,860), which is (1111 0011 0011 0011 0011 0100) in binary or (F3 3334) In Hex.

 

250mV would be represented as (4,194,304) which is (0100 0000 0000 0000 0000 0000) in binary or (40 0000) in Hex.

To represent -250mV you need the two’s complement of this number (-4,194,304), which is (1100 0000 0000 0000 0000 0000) or (C0 0000) in Hex.

 

0 件の賞賛

1,036件の閲覧回数
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Ioi,

The AFE module uses a complicated reference voltage system, but as you know that the range of AFE analog pin is from -500mV to +500mV, one LSB voltage is LSB=1V/(2**24), in other words, the analog voltage is (digital sample value)*[1/(2**24)]. For the digital sample value, 0x7F FFFF represents  +500mV, 0x80 0000 represents -500mV.

Hope it can help you

BR

Xiangjun rong

0 件の賞賛