Problem with bandgap V conversion

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

Problem with bandgap V conversion

ソリューションへジャンプ
1,109件の閲覧回数
sys
Contributor III

Hello,

I'm having troubles with the conversion in subject: I'm using Kinetis MKE02Z32VLH4 (2N22J), mounted on our custom board.

We are supplying VDDA/VREFH and VDD pins with 5V.

The ADC module is set to 12-Bit conversion, with these settings:

- Input clock select: Bus clock/2

- Prescaler: 8 (è frequency ~1048 kHz)

- Long sample time: Enabled

- Low power mode: Disabled

Reading Channel No 23 (bandgap), we read a value of 1442 on 4096 (12Bit). Considering that, from datasheet, the bandagap voltage should be about 1.16V, we obtain a Vdd voltage of 3.3V.

But we are supplying with 5V... Am I mistaking something? I would expect a value about of 950 corresponding to 1.16V with Vdd = 5V

Thanks in advance to all!

ラベル(1)
タグ(3)
1 解決策
802件の閲覧回数
davidsherman
Senior Contributor I

I ran into a problem with measuring the bandgap on a KE06, did you enable the bandgap in the Power Management Control?  It's not obvious that it has to be enabled first, and for me I was seeing unstable, far off results because it was reading something that wasn't connected.

元の投稿で解決策を見る

5 返答(返信)
802件の閲覧回数
sys
Contributor III

Thanks a lot!

that was the problem!

Thanks to everyone, real fast and useful answers!

Sorry Jingjing..both was Correct Answer..but I can select only one :smileyhappy:

Have great day u too

Sandro

PS: It is not clear to understand this setting reading datasheet..just a suggestion for next revision :smileyhappy:

802件の閲覧回数
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Sandro Mores,

     That good to hearing your problem is solved.

     It doesn't matter about the correct answer marking, it just demonstrate your question is soved.

    If you don't understand the datesheet, you can refer to our sample code.:smileyhappy:

Best regards!

Jingjing

0 件の賞賛
802件の閲覧回数
davidsherman
Senior Contributor I

Thank you Jingjing, I have to concur that the ADC section of the user's manual makes no mention of having to enable the bandgap buffer first to use it.   Something that should maybe be considered for a manual addendum.  The analog comparator section does make mention of this when using it for the reference, but if someone was trying to use the ADC, they would not know unless they happened to read the chapter on the PMC or the ACMP.

0 件の賞賛
802件の閲覧回数
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Sandro Mores,

      1: You should make sure that you already enable the bandgap in PMC.

PMC_SPMSC1 |= PMC_SPMSC1_BGBE_MASK;

      2: Test your VDDA and Vrefh, whether it is 5V.

      3: Check your configuration code, I test it on our FRDM-KE02Z40M, my bandgap ADC resut is 985 with 5V VDDA, when I test my VDDA, I find it is actually 4.85V.

    Then my bandgap is : (985/4096)*4.85=1.166V, it meets the Vbg data in our datasheet.

        You can refer to my test code to check your code,  please find the test code from the attachment:

Wish it helps you!

If you still have question please let me know!


Have a great day,
Jingjing

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

803件の閲覧回数
davidsherman
Senior Contributor I

I ran into a problem with measuring the bandgap on a KE06, did you enable the bandgap in the Power Management Control?  It's not obvious that it has to be enabled first, and for me I was seeing unstable, far off results because it was reading something that wasn't connected.