AM625: PRU Clock Speed

Part Number: AM625
Other Parts Discussed in Thread: SK-AM62

Tool/software:

Hi,

I am working on SPI bitbanging using AM625 Evm board using GPI Direct Input mode. The SPI master is streaming data continuously at the frequency speed of 12.5Mhz. I had an issue - I couldn't get all the bits.

 

Then, I started some testing. According to the TRM the clock speed of AM62x is 333Mhz.

So, I tried to toggle a PRU pin (P22 - GPMC0_AD5.PR0_PRU0_GPO5) using this code:

    .sect ".text"
    .global main

main:

MainLoop:

    SET r30, r30, 5         
    CLR r30, r30, 5         
    JMP MainLoop  

When I scope the pin, I got 12.5Mhz for Frequency and 25Mhz for width. If the PRU is running at 333Mhz clock frequency, I should expect at least around 160Mhz for one cycle or toggle (high/low) of the said pin.

Then, I saw in SK-AM62 Starter Kit User's Guide that the PRU pins are low speed - "AM62x SKEVM has a 20 pin PRU Header which offers Low speed connection to the PRG0 Interface" and I was thinking maybe that's the real reason.

So, I tried the Beaglebone black (200Mhz clock speed) and to see if I could toggle the pin in much faster speed.

I configured the P8_12 as pruout using the command "config-pin P8_12 pruout" and I used the same code above but instead of using bit 5, I used the bit 14 and run it.

The clock frequency was 16.667 Mhz and 25Mhz for width.

My question is, how I can verify if the PRU is running the correct clock and how to set it correctly (333Mhz for AM62x or Beaglebone 200Mhz)?.

 

Regards,

John