Cyclic ADC Channel Numbering - Possible Issue?

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

Cyclic ADC Channel Numbering - Possible Issue?

2,230 次查看
Kirilian
Contributor I

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.

pastedImage_2.png

The code being generated that relates to configuring these two samples is shown below:

pastedImage_3.png

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?

0 项奖励
回复
3 回复数

707 次查看
flowsn75
Contributor I

Hi, 

as with MCU Config Tools version 15.1 (linux edition), the bug continues. 

The tool sets hsadc_sample_config_t.channelNumber, but not considering an offset of 8 for the converter B. 

 

BR,

Florian

0 项奖励
回复

2,113 次查看
Lukas_Heczko
NXP Employee
NXP Employee

Hi Patrick,

thank you for reporting this issue, attached please find patch resolving this problem.

How to install the patch:

  1. Ensure you have an administrator rights, MCUXpresso Configuration Tools are not running and the MCU data of the MCUs you want to use are available (downloaded) on your desktop.
  2. Copy the content of this archive into the tool's data folder:
    Windows: c:\ProgramData\NXP\mcu_data_v7
    Linux/Mac: /home/<USER>/.nxp/mcu_data_v7
     

Regards,

Lukas

0 项奖励
回复

2,113 次查看
jingpan
NXP TechSupport
NXP TechSupport

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 

0 项奖励
回复