Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
stylenone
Info

1. Overview

The following is a high-level overview of the problem being resolved by this project:

...

This is an add-on product that installs on top of the Linux BSP for the NXP i.MX RT EVK board. It must be purchased separately from the Linux BSP product.

1. Overview

This document provides information on how to use ADC in the uClinux i.MX RT10XX BSPs.

2. Requirements

2.1. Detailed Requirements

...

  1. Provide a Linux demo project combining all the requirements in this project.

  2. Develop Linux ADC device driver for the i.MX RT1050 ADC controller.

2.2. Detailed Non-Requirements

...

3. Design

3.1. Detailed Design

3.1.1.
Anchor
Design-Demo-project
Design-Demo-project
Design: Demo project

This project will enable the required ADC functionality in the Linux configuration ("embedded project") called rootfs, which resides in a projects/rootfs directory, relative to the top of the Linux i.MX RT10XX installation.

3.1.2.
Anchor
Design-Linux-ADC-Device-Driver
Design-Linux-ADC-Device-Driver
Design: Linux ADC Device Driver

The clock driver for IMXRT10XX SoC will be updated to support the ADC clock gates.

...

  • Login: CONTACT EMCRAFT

  • Password: CONTACT EMCRAFT

4.2.
Anchor
Downloadable-Files
Downloadable-Files
Downloadable Files

The following files are available from the secure download area:

...

  1. Download the files listed in Section: "Downloadable Files" to the top of the Linux i.MX RT installation.

  2. Install the BSP, as per the respective "Installing and activating cross development environment" document in the "Software" section on the Emcraft site.

  3. From the top of the Linux installation, activate the Linux cross-compile environment by running:

    Code Block
    $ . ACTIVATE.sh
    
  4. From the top of the BSP installation, go to the Linux kernel tree and install the kernel patch, eg:

    Code Block
    $ cd linux/
    $ patch -p1 < ../../linux-adc.patch
    
  5. From the top of the Linux installation, go to the projects sub-directory, and patch the rootfs project:

    Code Block
    $ cd projects/
    $ patch -p1 < ../../projects-adc.patch
    
  6. Build the rootfs project:

    Code Block
    $ cd projects/rootfs
    $ make
    

4.4. Detailed Test Plan

4.4.1.
Anchor
TestPlan-Demo-Project
TestPlan-Demo-Project
Test Plan: Demo Project

Perform the following step-wise test procedure:

  1. Go to the projects/rootfs directory, build the loadable Linux image (rootfs.uImage) and copy it to the TFTP directory on the host:

    Code Block
    $ cd projects/rootfs
    $ make
    
  2. Boot the loadable Linux image (rootfs.uImage) to the target via TFTP and validate that it boots to the Linux shell:

    Code Block
    => run netboot
    Using ethernet@402D8000 device
    TFTP from server 192.168.1.73; our IP address is 192.168.1.105
    Filename 'rootfs.uImage'.
    Load address: 0x80007fc0
    Loading: #################################################################
             #################################################################
             #################################################################
             #################################################################
    ...
    
    / # uname 
    Linux
    / #

4.4.2.
Anchor
TestPlan-Linux-ADC-Driver
TestPlan-Linux-ADC-Driver
Test Plan: Linux ADC Driver

Perform the following step-wise test procedure:

  1. Connect 3.3V to channel 9 of ADC1 (for this, one can wire J25.4 to J23.3)

  2. Check that the measurement on channel 9 of ADC1 is near maximum (4096):

    Code Block
    cat /sys/bus/iio/devices/iio:device0/in_voltage9_raw
    4094
    
  3. Connect GND to channel 9 of ADC1 (for this, one can wire J25.6 to J23.3)

  4. Check that the measurement on channel 9 of ADC1 is near minimum (0):

    Code Block
    / # cat /sys/bus/iio/devices/iio:device0/in_voltage9_raw
    2
    
  5. Connect a wire with known voltage applied to channel 9 of ADC1.

  6. Check that the measurement on channel 9 of ADC1 corresponds to the applied voltage measured with a voltage meter:

    Code Block
    / # cat /sys/bus/iio/devices/iio:device0/in_voltage9_raw
    3278
    / # cat /sys/bus/iio/devices/iio:device0/in_voltage_scale 
    0.805664062
    / #
    

    (3278 corresponds to 3278 * 0.805664062 = 2.6V )

  7. Repeat the tests with channels 0 of ADC1 (J23.2), 10 (J23.4) and 15 (J23.1)

...