This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Using AM3358 as a frequency counter

I'm looking to verify a 32KHz and a 12MHz frequency and was thinking of using either a timer/counter or the quadrature encoder inputs.

Any recommendations which to use and if there is a way to gate the counting on either an external signal or by an internal periodic event?

I'm having trouble locating the documentation for each of these modules and am wondering how much support there is for them in the distribution code.

  • Hi,

    Both, timer/counter or eQEP modules could be of use in your case.

    Information about the modules in AM335x can be found in the Technical Reference Manual (www.ti.com/.../technicaldocuments) :

    - Chapter 15 Pulse-Width Moduleation Subsystem
    - Chapter 20 Timers

    However support of eQEP(enhanced quadrature encoder) is limited in the linux releases, see: processors.wiki.ti.com/.../Sitara_Linux_PWM_Driver_Overview

    It may be of useful to have a look at the examples in the RTOS (for reference on how to set the modules): software-dl.ti.com/.../index_FDS.html

    Best Regards,
    Yordan
  • I've been looking at using DM Timers and I think I have a way to do this.

    1. Set up one DM timer to put out an accurate 1 sec pulse(output trigger/PWM signal) using the CLK_32KHZ clock source.
    2. Wire the the 1 sec pulse output from the 1st DM timer into a second DM timer (PIEVENTCAPT) capture control input while feeding the clock to measure into TCLKIN for use on the second timer.

    My concern is the allocation of the timers by the linux image and associated drivers. Since I have to hard wire this capture control signal I need to hard allocate the timers I will use. I plan on using

    • ethernet port and associated TCPIP protocol stack
    • the USB port
    • the MMC port
    • the PWM outputs

    All on a Beaglebone Black

    Can someone identify if there are timers that have been allocated (should not be used) given my usage?