LPC55S69 Configtool ADC, something missing in the ADC0_init?

cancel
Showing results for 
Search instead for 
Did you mean: 

LPC55S69 Configtool ADC, something missing in the ADC0_init?

Jump to solution
1,057 Views
gertvb
Contributor III

Good Day!

This is a duplicate of a post that I did in the "LPC Microcontrollers" group, but have since realised that I should rather have posted it here. Link to the original post : https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-Configtool-ADC/td-p/1168980

I am using an OKDO E1 board with the LPC55S69 MCU, Hardware 1B, developing with MCUXpresso 11.2.0 with SDK version 2.8.2(376 2020-08-19)

I have set up 6x ADC inputs from within MCUXpresso with the embedded Pheriperals tool of the CONFIGTOOL, instead of coding every ADC register in my own software.

Anyhow my project compiles and runs on MCUXpresso. (see attached  zip file), ive also included the prosess I used to create the project from scratch (see the attached pdf file)

BUT all the results that I read back from the ADC FIFO have the value 32768, even though my signal generator is correctly outputting the 6 sine waves into the ADC pins.

However if I FIRST run the lpcxpresso55s69_lpadc_polling example project, and then run my project, my project reads the correct values on the ADC inputs.

Telling me that SOMETHING CRUCIAL is missing in the initialization of the ADC (ADC0_Init), but that this is actually done in the lpcxpresso55s69_lpadc_polling example project.

Can someone please just check what it is that I am missing?

Kind regards

Gert van Biljon

 

Notes :

1. The OKDO E1 does not have a 32MHz crystal populated on the board, hence me using PLL1 from the 12MHz Free running Oscillator to generate the 150MHz I use for the core

2. I prefer the route of using the embedded Pheriperals Configuration tool from withint MCUXpresso, as until recently I was jumping between the AtSAMD51 and XMC4500 and for that I successfully used Infineon's DAVE and Atmel's Atmel Studio 7, where I didn't have to go down to register level to configure the ADC to run with DMA

3. This project was generated from scratch, but I think it should run on an lpcxpresso55s69 dev board?

A TechExplorer working with Embedded Software and Electronics in Agriculture and Alternative Energy
0 Kudos
1 Solution
999 Views
gertvb
Contributor III

In this case it rather seems to be a pebkac error on my side and nothing wrong with configtools

I have not enabled the power to the ADC!

Added the following before the while (1) loop, and it now works

POWER_DisablePD(kPDRUNCFG_PD_LDOGPADC);

A TechExplorer working with Embedded Software and Electronics in Agriculture and Alternative Energy

View solution in original post

4 Replies
1,000 Views
gertvb
Contributor III

In this case it rather seems to be a pebkac error on my side and nothing wrong with configtools

I have not enabled the power to the ADC!

Added the following before the while (1) loop, and it now works

POWER_DisablePD(kPDRUNCFG_PD_LDOGPADC);

A TechExplorer working with Embedded Software and Electronics in Agriculture and Alternative Energy
980 Views
gusarambula
NXP TechSupport
NXP TechSupport

Hello Gertvb,

Thank you for sharing your finding! I’m glad that you could find this omission!

Regards,
Gustavo

0 Kudos
1,038 Views
mark2
Contributor III

Hey Gert,

I downloaded the MCUX project and ran it on my OKdo E1 board. It works just fine... once the ADC has been calibrated...

mark2_0-1603647153594.png

The clue was in your comment about it all working if you'd previously loaded the SDK's lpadc polling example. I've seen that from time to time.

Anyway, good luck and let us know how you get on.

Mark

embeddedpro

 

1,034 Views
mark2
Contributor III

Actually, scratch that. Just tried after power cycling the board and it's back to the original behaviour. This time all 6 channels read 32768 again. But I'm sure that we're only something with the ADC calibration.

Let me continue some tests.

0 Kudos