I am using MCUXpresso v11.1.1 Build 3241. I am using SDK v2.7.0 for the KV46. I am developing for the KV46F256VLL16 microcontroller.
I am configuring the Cyclic ADC peripheral using the Config Tools. I am trying to setup two channels (6 and 7), both on ADC B. See image below.
The code being generated that relates to configuring these two samples is shown below:
The problem seems to come from the .channelNumber field. The value of this field is directly used to configure the CLISTx registers. However, for ADC B, the values for .channelNumber should be 0x0E (for channel 6) and 0x0F (for channel 7) if the .channelNumber field is being used directly to populate the CLISTx registers. Populating the CLISTx registers occurs in the SDK function CADC_SetSampleConfig. In this function, CLISTx is populated using the .channelNumber field value directly.
The Config Tool knows about the full list of ADC channels and which ADC they are connected to. Perhaps their is a mistake in the Config Tool channel list? Or am I doing something wrong?
Hi Patrick,
thank you for reporting this issue, attached please find patch resolving this problem.
How to install the patch:
Regards,
Lukas
Hi Patrick,
Yes, you are right.This is a bug. ADCB channel number should from 8 to 15. The ADC examples in SDK use number 8~15 for ADCB. I'll report this bug to software team.
Thanks a lot!
Regards,
Jing