S32M276 HD voltage

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S32M276 HD voltage

Jump to solution
3,382 Views
MarkShen__
Contributor II
Hello,
I am using the S32M276 and trying to read the HD voltage. I see that it can be read through ADC1 S16, but it requires HD_DIV conversion. Do you know how to obtain the HD_DIV information?
For example, if the ADC value I read is 4019,
V_adc = 4019 / 16383.0 * 3.3 = 0.809V
how do I convert it to the actual HD voltage value?
 
Thanks and BR
Tags (1)
0 Kudos
Reply
1 Solution
3,285 Views
_Leo_
NXP TechSupport
NXP TechSupport

For (D2D) HD measurement using PTA6 ADC1_S18, you should also include the voltage divider factor into previously mentioned equation.

Such voltage divider factor is configured with CFG[HDHSDIV] register (see reference manual):

_Leo__0-1762896791370.png

The voltage divider factor values are stated datasheet:

_Leo__1-1762896801798.png

So equation 2 should be updated to:

ADCresult = ((2^N) (Vin / divider_factor)) / VREF

I hope this information is helpful.

View solution in original post

0 Kudos
Reply
4 Replies
3,325 Views
_Leo_
NXP TechSupport
NXP TechSupport

Thank you for your interest in our products and for contributing to our community.

You could use the equation 2, mentioned in AN12217 S32K1xx and S32M24x ADC Guidelines, Spec and Configuration.

I hope this information is helpful.

0 Kudos
Reply
3,293 Views
MarkShen__
Contributor II

Hello Leo,

Thank you for your reply. After calculating the voltage value of Vadc, how do I calculate the voltage of HD (the bus voltage of the B6 bridge)?

HD is PIN3 of the S32M276.

0 Kudos
Reply
3,286 Views
_Leo_
NXP TechSupport
NXP TechSupport

For (D2D) HD measurement using PTA6 ADC1_S18, you should also include the voltage divider factor into previously mentioned equation.

Such voltage divider factor is configured with CFG[HDHSDIV] register (see reference manual):

_Leo__0-1762896791370.png

The voltage divider factor values are stated datasheet:

_Leo__1-1762896801798.png

So equation 2 should be updated to:

ADCresult = ((2^N) (Vin / divider_factor)) / VREF

I hope this information is helpful.

0 Kudos
Reply
2,940 Views
MarkShen__
Contributor II
Hi Leo,
Sorry, I’ve been busy with another project recently. My colleague is working on this project, and he told me that the voltage can now be read correctly. Thank you very much for your support.
0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2201237%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ES32M276%20HD%20voltage%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2201237%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CDIV%3EHello%2C%3C%2FDIV%3E%3CDIV%3EI%20am%20using%20the%20S32M276%20and%20trying%20to%20read%20the%20HD%20voltage.%20I%20see%20that%20it%20can%20be%20read%20through%20ADC1%20S16%2C%20but%20it%20requires%20HD_DIV%20conversion.%20Do%20you%20know%20how%20to%20obtain%20the%20HD_DIV%20information%3F%3C%2FDIV%3E%3CDIV%3EFor%20example%2C%20if%20the%20ADC%20value%20I%20read%20is%204019%2C%3C%2FDIV%3E%3CDIV%3EV_adc%20%3D%204019%20%2F%2016383.0%20*%203.3%20%3D%26nbsp%3B0.809V%3C%2FDIV%3E%3CDIV%3Ehow%20do%20I%20convert%20it%20to%20the%20actual%20HD%20voltage%20value%3F%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3EThanks%20and%20BR%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2202973%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32M276%20HD%20voltage%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2202973%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EFor%20(D2D)%20HD%20measurement%20using%20PTA6%20ADC1_S18%2C%20you%20should%20also%20include%20the%20voltage%20divider%20factor%20into%20previously%20mentioned%20equation.%3C%2FP%3E%0A%3CP%3ESuch%20voltage%20divider%20factor%20is%20configured%20with%20%3CEM%3ECFG%5BHDHSDIV%5D%3C%2FEM%3E%20register%20(see%20reference%20manual)%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22_Leo__0-1762896791370.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22_Leo__0-1762896791370.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F365016iE19BDDE89C04AAB0%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22_Leo__0-1762896791370.png%22%20alt%3D%22_Leo__0-1762896791370.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EThe%20voltage%20divider%20factor%20values%20are%20stated%20datasheet%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22_Leo__1-1762896801798.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22_Leo__1-1762896801798.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F365017i65B6EE6B8F6386F6%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22_Leo__1-1762896801798.png%22%20alt%3D%22_Leo__1-1762896801798.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3ESo%20equation%202%20should%20be%20updated%20to%3A%3C%2FP%3E%0A%3CP%3E%3CEM%3EADCresult%20%3D%20((2%5EN)%20(Vin%20%2F%20divider_factor))%20%2F%20VREF%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3EI%20hope%20this%20information%20is%20helpful.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2202775%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32M276%20HD%20voltage%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2202775%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CSPAN%3EHello%20Leo%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EThank%20you%20for%20your%20reply.%20After%20calculating%20the%20voltage%20value%20of%20Vadc%2C%20how%20do%20I%20calculate%20the%20voltage%20of%20HD%20(the%20bus%20voltage%20of%20the%20B6%20bridge)%3F%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EHD%20is%20PIN3%20of%20the%20S32M276.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2202085%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32M276%20HD%20voltage%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2202085%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EThank%20you%20for%20your%20interest%20in%20our%20products%20and%20for%20contributing%20to%20our%20community.%3C%2FP%3E%0A%3CP%3EYou%20could%20use%20the%20equation%202%2C%20mentioned%20in%20%3CA%20href%3D%22https%3A%2F%2Fwww.nxp.com%2Fdocs%2Fen%2Fapplication-note%2FAN12217.pdf%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3EAN12217%20S32K1xx%20and%20S32M24x%20ADC%20Guidelines%2C%20Spec%20and%20Configuration%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3EI%20hope%20this%20information%20is%20helpful.%3C%2FP%3E%3C%2FLINGO-BODY%3E