LPC54618 ADC Self calibration using deprecated function

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC54618 ADC Self calibration using deprecated function

Jump to solution
3,408 Views
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 Kudos
Reply
1 Solution
3,327 Views
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

View solution in original post

0 Kudos
Reply
10 Replies
3,391 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello,

You can enable this function as below:

Alice_Yang_0-1659428139473.png

 

BR

Alice

 

0 Kudos
Reply
3,383 Views
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 Kudos
Reply
3,373 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello,

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

0 Kudos
Reply
3,367 Views
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 Kudos
Reply
3,346 Views
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 Kudos
Reply
3,339 Views
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 Kudos
Reply
3,328 Views
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 Kudos
Reply
3,293 Views
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 Kudos
Reply
3,281 Views
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 Kudos
Reply
3,260 Views
jared77
Contributor I

Thanks for the updated patch!

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

0 Kudos
Reply