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.

AM2634-Q1: How to configure PRU clock

Part Number: AM2634-Q1

I have an application where I need to adjust the PRU clock (if possible) to be as close as possible to 160MHz. The TRM seems to be lacking information and the registers for clock selection for the PRU don't seem to be documented in the TRM register addendum, or at least I can't seem to find them.

Can you provide detail on which registers to configure or provide an update on when the documentation will be available?

  • Hi,

    Sorry for the delayed response. I'm looking into this and will get back with you.

    Regards,
    Frank

  • Hello Jake,

    Here is an example on how to set the ICSSM Clock to 192 MHz that is from the TRM:

    The PRU clock does have the ability to be 160MHz. This is achieved by the same process as above. Here are the steps to achieve 160 MHz:

    1. Program ICSSM0_UART0_CLK_DIV_VAL.CLKDIV = 0x000
    2. Poll for the CURRDIVR field of corresponding status register to reflect its new frequency change, ICSSM0_UART0_CLK_STATUS.CURRDIVIDER = 0x00 (bits 8-15 of physical address 0x53208454)
    3. Update the ICSSM UART GCM register with the value of 0x777 to select DPLL_PER_HSDIV0_CLKOUT0 as its source, ICSSM0_UART0_CLK_SRC_SEL.CLKSRCSEL = 0x777 (physical address 0x53208154)
    4. Poll for the CLKINUSE field of corresponding status register to reflect its new frequency change, ICSSM0_UART0_CLK_STATUS.CLKINUSE = 0x80 to reflect that clock source 7 is selected (160 MHz)

    Regards,

    Erik

  • Hi Erik,

    It's not clear anywhere else in the TRM that the PRU core clock is the same as the PRU UART clock. This diagram and description implies that the PRU clock is independent of the UART clock as the UART is a PRU peripheral:

    Is my understanding correct?

  • Hello Jake,

    Thank you for pointing this out. I am seeing that there is the clock mux option for ICSSM UART and the ICSSM Core Clock which operates at 200 MHz. I am contacting the ICSSM expert to further understand how the ICSSM can be configured to handle these two clock signals. I will have a response for you early next week. Are you using the ICSSM to emulate a UART module?

    Regards,

    Erik

  • No, actually using it for a custom interface. Bit banging the interface with the PRU GPO.

  • Hello Jake,

    The AM263x PRU-ICSS has a fixed core clock frequency of 200MHz that is not configurable. You are correct that the UART clock is independent of the Core Clock and that the PRU-ICSS clock diagram need to be updated to reflect that. The UART clock input is used specifically for the dedicated UART module of the PRU-ICSS and not for the PRU system overall. 

    However, It is possible to configure the PRU to operate on a cycles per tick basis. For example, we have a Soft UART PRU firmware example takes the 200MHz Core clock and establishes a variable "CYCLES_PER_TICK" and then uses the number of "Ticks" to emulate a specific baud rate. For 115200 baud, the 200MHz clock has 124 PRU cycles per tick and 14 ticks to achieve 115200 baud: 200MHz/124 PRU cycles per tick / 14 ticks = 115200 baud. This does not help you in emulating 160MHz since that would be 1.25 cycles per tick from 200MHz but hopefully it can shed light on the configurability of the PRU-ICSS.

    Regards,

    Erik