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?
Solved! Go to Solution.
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);
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);
Hello Gertvb,
Thank you for sharing your finding! I’m glad that you could find this omission!
Regards,
Gustavo
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...
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
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.