LPC55S28 ADC SDK POWER_DisablePD missing?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

LPC55S28 ADC SDK POWER_DisablePD missing?

1,264 次查看
BertrandR
Contributor II

Hello,

Context : I am a fully newby on NXP microcontroller. I purchased a dev board ( LPC55S28-EVK) and start playing with peripheral to check how to use it.

For ADC peripheral, I just place a potentiometer on pin 20 ( ADC0_P). I test the SDK example and it works. So my hardware configuration is ok.

Now, with my own project : I configure pin, configure clock and try to setup peripheral on MCUexpression config tool as interrupt mode. Code has been generated automatically with the config tool.

During first tries, interrupt occurs well but the result was always 32768. 

I compare all configuration register with SDK sample and seems ok.

After a while, I see that the following ADC power up was missing

/* Disable LDOGPADC power down */
POWER_DisablePD(kPDRUNCFG_PD_LDOGPADC);

Is it normal that is is not automatically generated by the configuration tool?

Bertrand

0 项奖励
回复
4 回复数

1,150 次查看
danielholala
Senior Contributor II

Naaaa, that's a bug.

Just recently MCUXpresso IDE v11.7.0 has been released and with it an updated set of Config Tools v13.

Now Peripheral Tool adds this line to the ADC0 init function in peripherals.c

Seems this bug has been fixed.

标记 (3)

1,243 次查看
BertrandR
Contributor II

Hello,

Many thanks for your answer. I understand, but it could be very usefull to indicate what we have to add by our own ( like it is done for Interrupt Callback...). It could be indicated in the sdk manual ( I don't find it) or add as a comment block in peripheral.c or .h.

My 2 cts.

Bertrand 

I don't find the indication about what is not include in the generated code in the SDK manual 

0 项奖励
回复

1,236 次查看
RaRo
NXP TechSupport
NXP TechSupport

Hello @BertrandR,

Thank you for the feedback, we will let the team in charge know, for upcoming updates.

For the moment, you could look up the examples, they might help you as a guide.

Regards, Raul.

0 项奖励
回复

1,247 次查看
RaRo
NXP TechSupport
NXP TechSupport

Hello @BertrandR,

First of all, welcome to the community.

Related with your question, ConfigTools only modify certain parts of your project, not all of it.

ConfigTools -> Peripherals only modify board\peripherals.c and board\peripherals.h; ConfigTools -> Clocks only modify board\clock_config.c and board\clock_config.h; and ConfigTools -> Pins only modify board\pin_mux.c and board\pin_mux.h. You can watch what part of your code are you generating in ConfigTools -> Overview -> Generated code.

RaulRomero_0-1668111505640.png

The line you are missing is at main, so any of your ConfigTools configuration won't generate the disable LDOGPADC power down line [POWER_DisablePD(kPDRUNCFG_PD_LDOGPADC)] in your project.

Best regards, Raul.