LPC54618 ADC Self calibration using deprecated function

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

LPC54618 ADC Self calibration using deprecated function

跳至解决方案
6,389 次查看
jared77
Contributor I

I recently moved from MCUXpresso 11.3 to 11.5.1. I noticed that my ADC isn't reading properly anymore. I have been using LPC54618 sdk 2.9.0 if that matters

I noticed that the auto-generated code in my project before upgrading used ADC_DoOffsetCalibration, and after re-generating my peripherals.c file, ADC_DoSelfCalibration is used. I then noticed that ADC_DoSelfCalibration is deprecated and when I switch back to the old function I'm able to accurately read the microcontroller's internal temperature sensor again.

I won't go into specifics of the combinations but I have tried regenerating my peripherals.c file with various combinations of MCUXpresso including 11.4, 11.5.1, and 11.6. I've also tried SDKs 2.11.1 and 2.12.0 in various IDE versions. All combinations of the SDKs and IDEs so far have resulted in the deprecated function.

Is there anything I can do about this or do I just have to manually edit the generated code each time I generate?

Thanks!

0 项奖励
回复
1 解答
6,306 次查看
jch
NXP Employee
NXP Employee

Hi jared77,

sorry for inconvenience, attached is the patch to generate correct function.

Patch is updated to production version.

Have a nice day

在原帖中查看解决方案

0 项奖励
回复
10 回复数
6,370 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello,

You can enable this function as below:

Alice_Yang_0-1659428139473.png

 

BR

Alice

 

0 项奖励
回复
6,362 次查看
jared77
Contributor I

Alice,

I'm already using that to generate the code. The issue is that the generated code is using a deprecated function that doesn't work. Old versions of MCUXpresso generate code with the correct function while new versions use the deprecated function.

0 项奖励
回复
6,352 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello,

 Does the "old version" is SDK v2.9? 

0 项奖励
回复
6,346 次查看
jared77
Contributor I

Yes, the old version was SDK v2.9 and IDE version 11.3.0. I think that the config tools are to blame as using SDK v2.9 on IDE v11.5.1 still generates with the deprecated function.

0 项奖励
回复
6,325 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello,

I compare the function ADC_DoSelfCalibration() between SDK v2.9 and v2.12, there is no difference.

Could you please share the code in  ADC_DoSelfCalibration() from IDE v13?

 

BR

Alice

0 项奖励
回复
6,318 次查看
jared77
Contributor I

Alice,

ADC_DoSelfCalibration() is the Deprecated function and has been from SDK 2.9-2.12 and maybe even before then, see my screenshot. I said in the last post the SDK isn't the issue, it's that the config tools are using ADC_DoSelfCalibration() which is deprecated rather than ADC_DoOffsetCalibration(). IDE v13 config tools generated code using ADC_DoOffsetCalibration() which was correct.

0 项奖励
回复
6,307 次查看
jch
NXP Employee
NXP Employee

Hi jared77,

sorry for inconvenience, attached is the patch to generate correct function.

Patch is updated to production version.

Have a nice day

0 项奖励
回复
6,272 次查看
jared77
Contributor I

jch,

I looked at the patch you sent, I used a diff tool and it's already present in both the mcu_data_v11 and mcu_data_v12 folders on my machine. I applied the update and the code generation in MCUXpresso v11.5.1 is still trying to use the deprecated function. Could there be another newer patch already applied that I might need to remove or something?

Update Files.png

0 项奖励
回复
6,260 次查看
jch
NXP Employee
NXP Employee

Hi jared77,

sorry, now the patch above is updated to the production version and should work.

Have a nice day

0 项奖励
回复
6,239 次查看
jared77
Contributor I

Thanks for the updated patch!

I installed it in the mcu_data_v11 folder and the code generates properly now.

0 项奖励
回复