AM263x MCU+ SDK  08.05.00
EQEP frequency measurement

Introduction

This example uses the EQEP to measure frequency of a signal generated by ePWM.

The example does the below

  • Configures EPWM to generate a signal and EQEP to measure frequency of this generated signal (a loopback connection is required).
  • The application runs for the specified time and the frequency calculation is done using the EPWM ISR.
  • After the specified time, the application checks if the measured frequency was within range of the generated frequency.

External connections

  • Connect eQEP0A to ePWM0A (simulates eQEP Phase A signal)
  • Connect eQEP0B to ePWM0B (simulates eQEP Phase B signal)
  • Connect eQEP0I to GPIO48 (simulates eQEP Index Signal)

AM263X-CC

When using AM263x-CC with TMDSHSECDOCK (HSEC180 controlCARD Baseboard Docking Station)

  • Connect HSEC Pin 49 to HSEC Pin 102 (simulates eQEP Phase A signal)
  • Connect HSEC Pin 51 to HSEC Pin 100 (simulates eQEP Phase B signal)
  • Connect HSEC Pin 106 to HSEC Pin 52 (simulates eQEP Index Signal)

AM263X-LP

  • Connect eQEP2A (J25 Pin 1) to ePWM0A (J2/J4 Pin 11) (simulates eQEP Phase A signal)
  • Connect eQEP2B (J25 Pin 2) to ePWM0B (J6/J8 Pin 59) (simulates eQEP Phase B signal)
  • Connect eQEP2I (J25 Pin 3) to GPIO48 (J2/J4 Pin 40) (simulates eQEP Index Signal)

Supported Combinations

Parameter Value
CPU + OS r5fss0-0 nortos
Toolchain ti-arm-clang
Board am263x-cc, am263x-lp
Example folder examples/drivers/eqep/eqep_frequency_measurement/

Steps to Run the Example

  • When using CCS projects to build, import the CCS project for the required combination and build it using the CCS project menu (see Using SDK with CCS Projects).
  • When using makefiles to build, note the required combination and build using make command (see Using SDK with Makefiles)
  • Establish connections as mentioned in External Connections section
  • Launch a CCS debug session and run the executable, see CCS Launch, Load and Run
  • View the UART console logs for results

See Also

EQEP

Sample Output

Shown below is a sample output when the application is run,

EQEP Frequency Measurement Test Started ...
EQEP Frequency Measurement Test Passed!!