How to enable auto-calibration in ADC blocks?

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

How to enable auto-calibration in ADC blocks?

2,090 次查看
p_a_u_darshana
Contributor III

How can I enable ADC calibration in Simulink?

V4.2.0 product release report says that it is available in the block. But I cannot find any option in the ADC config block.

p_a_u_darshana_0-1631684033723.png

 

标记 (4)
0 项奖励
回复
3 回复数

533 次查看
tevayeb
Contributor I

Steps to Enable ADC Calibration in Simulink:

  1. Check Simulink Version: Ensure that you are using Simulink version 4.2.0 or later. If you are not sure about your version, you can check it by navigating to the Help section and selecting "About Simulink" or running ver in the MATLAB command window.

  2. Use the ADC Configuration Block:

    • Open your model in Simulink.
    • Search for the ADC Configuration block, which can typically be found in the Simulink > Simscape > Electrical > Specialized Power Systems > ADCs section, or by typing "ADC" in the block search bar.
    • If you're using specific hardware, ensure that you have selected the correct hardware setup that supports ADC calibration.
  3. Look for Calibration Option:

    • In the ADC Configuration block, look for a "Calibration" or "Enable ADC Calibration" parameter. This parameter should be available in Simulink V4.2.0 or later.
    • If this option is present, you can enable it directly in the block’s parameter window.
  4. Hardware-Specific Blocks:

    • If you are working with specific hardware (e.g., Texas Instruments, Analog Devices, etc.), make sure that the associated support package or driver for the hardware is installed.
    • Some support packages may expose additional calibration parameters or blocks that aren't available in the base Simulink ADC Configuration block.
  5. Model Configuration Settings:

    • If the calibration option is not available in the block, you may need to enable it in the Model Configuration Parameters.
    • Go to Simulation > Model Configuration Parameters and check if there’s a section for hardware-specific settings, where you can enable ADC calibration for the target hardware.
  6. Update or Install Additional Support Packages:

    • In some cases, enabling ADC calibration requires additional support packages or updates. You can check if there are updates available for the hardware support package you are using by going to Add-Ons > Manage Add-Ons in MATLAB.
    • You can also check for hardware-specific documentation or Simulink help to ensure that calibration is supported by the configuration block. mission lane login
0 项奖励
回复

2,018 次查看
Merritt08
Contributor I

Hello,

 

1. I observe the same issue with self-calibration of no value being written to ADC1_CAL after calibration completes successfully (CAL bit clears and CALF bit is not set). However some value getting written to ADC1_R0. This happens when VBGH/VBGL is selected as voltage reference, but if VREFH/VREFL with all other settings being the same, the calibration gives results in the ADC1_CAL.  In the first case where VBGH/VBHL is selected and calibration does not have any results, subsequent conversions seem to have significant offset from the true value. Any suggestions?

2. I need ADC performance/accuracy characterization with internal bandgap used as voltage reference. How can I get that data?

0 项奖励
回复

2,079 次查看
mariuslucianand
NXP Employee
NXP Employee

Hello @p_a_u_darshana ,

The AutoCalibration function is called automatically for all the instances enabled in the S32K Blocks.

mariuslucianand_0-1631692884801.png

Hope this helps,

Marius