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.

  • Resolved

Linux/AM3354: Access to clocks/timers in PRU assembly programs

Prodigy 160 points

Replies: 4

Views: 184

Part Number: AM3354

Tool/software: Linux

Hi!

I've been following basic examples for SPI-communication using Derek Molloy's PRU example: 

One PRU is used as an adjustable clock for the communication here, but i was wondering if it is possible to access and use system clocks. (I have a purpose for the other PRU).

This is on the BeagleBone Black, where there are mcSPI-modules available. The purpose is however to demonstrate usage of PRU and its communication with the main processor.

  • Hello Jonas,

    What version of Linux are you using?

    I am not sure I understand what you are asking. Could you restate what you are trying to accomplish?

    As an FYI, there is also a TI design for interfacing with multiple ADCs by implementing SPI on the PRU here: www.ti.com/.../TIDA-01555

    Regards,
    Nick
  • In reply to Nick Saulnier:

    What is the best way to use other clocks/timers to keep track of time in a PRU-assembler program?
  • In reply to Jonas Hjulstad:

    Hello Jonas,

    The PRU-ICSS has two methods of keeping track of time: The Industrial Ethernet Peripheral timer (sometimes called IEP timer, sometimes called Industrial Ethernet Timer in the AM335x technical reference manual or TRM), and the cycle count register. The IEP timer is probably what you are looking for.

    Regards,
    Nick
  • In reply to Nick Saulnier:

    We do not have an assembly example of using the IEP timer, but we have a C example within the PRU Software support package (in your Linux Processor SDK under example-applications/pru-icss-x.x.x/examples/am335x/PRU_IEP, or at the git repo git.ti.com/.../ ).

    General TI PRU resources are at processors.wiki.ti.com/.../PRU-ICSS

    Regards,
    Nick

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.