S12ZVM Vsup Measure Problem

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

S12ZVM Vsup Measure Problem

612件の閲覧回数
dufour-thibaut
Contributor I

Hi,

I'm working on S12ZVM microcontroller, and I'm measuring the Vsup voltage, the adc_result is good until it reaches 328 (14.7V for me).

After this value the result doesn't move, and before it is correctly tracking the supply voltage.

My code at each interrupt :

static void DIOS12ZVM_ADC_GetValuesConfig0 ( void )
{
SetADCRealResults_u16( VCSOUT, ( adc0_results_u16[1] << 6U ) ) ;
#if 1
SetADCRealResults_u16( TMES, ( adc0_results_u16[0] << 6U ) ) ;
temp = adc0_results_u16[2]; // to debug
temp1 = temp << 6U ; // to debug
SetADCRealResults_u16( UMES, ( temp1 ) ) ;
#else
#warning "This code is only to test with NXP Eval Board"
SetADCRealResults_u16( TMES, 32800 ) ; /* Simulate 25 Deg C */
SetADCRealResults_u16( UMES, 16738 ) ; /* Simulate ~12V */
#endif
}

temp = 328 after 14.7V

Thank you

Thibaut

タグ(1)
0 件の賞賛
返信
1 返信

517件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hi Thibaut,

Could you please use this example:

BATS Voltage Supply Sense example code for MagniV devices 

You should be able to use the main.c and ADC_LBA.h files without any modification.

It can measure VSUP up to 29V (Table G-1, #7)..

The max ADC input voltage is therefore ~ 3.22V (29V / 9).

Regards,

Daniel 

0 件の賞賛
返信