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.

Linux/AM5708: TIMER15 capture input issue in a AM5708 based custom board

Part Number: AM5708

Tool/software: Linux

Hi

I have a custom AM5708 based board and want to use Timer15 for input timestamping (capture)

I am working with SDK Linux RT 5.00.00.15.

I have configured properly the pinmux for my timer15 input H24 (xref_clk2) and configured the other potentially timer15 input (usb2-..) as drive-off.

The thing is that this timer input pin H24 is always at low level, pulling my external input signal down. If I configure that H24 input as gpio then

the external signal is ok at the micro input pin H24.

Billa

  • That timer15 signal can be used as an input or an output. Have you done anything at the peripheral level (i.e. with respect to the timer configuration) in order to configure that pin as an input for use as a capture pin?
  • Billa,

    Looking at the Linux source code, I don't see any software implementation for the capture capability. Can you tell me more about how you're planning to use this signal? Is it related to a 1PPS signal for PTP?

    Brad
  • Brad,

    Our idea is to have TIMER16 to generate a PPS signal and TIMER15 and TIMER3 to capture rising edge in a digital input.

    Right now we have TIMER16 generating PPS signal as expected. The code is running in the DSP and we have PPS signal

    with both, u-boot and Linux running in A15.

    Basically programming a timer to work as TS is quite similar to programing as PPS except a few changes in the registers

    (correct if I am wrong). Here you have the register values for TIMER15:

             - pinmux   0x4a00_369c ----> 0x0005_000a

             - clkctrl     0x4a00_97d8 ----> 0x0000_0002

             - registers 0x4882_c000 ---->

    => md 0x4882c000
    4882c000: 4fff2b01 00000000 00000000 00000000    .+.O............
    4882c010: 00000006 00000000 00000000 00000000    ................
    4882c020: 00000000 00000006 00000000 00000000    ................
    4882c030: 00000000 00000000 00004103 ff6f0c57    .........A..W.o.
    4882c040: ff676980 ffffffff 00000000 00000000    .ig.............
    4882c050: ff676980 00000000 00000000 00000000    .ig.............
    4882c060: 00000000 00000000 00000000 00000000    ................
    4882c070: 00000000 00000000 00000000 00000000    ................
    4882c080: 00000000 00000000 00000000 00000000    ................
    4882c090: 00000000 00000000 00000000 00000000    ................
    4882c0a0: 00000000 00000000 00000000 00000000    ................
    4882c0b0: 00000000 00000000 00000000 00000000    ................
    4882c0c0: 00000000 00000000 00000000 00000000    ................
    4882c0d0: 00000000 00000000 00000000 00000000    ................
    4882c0e0: 00000000 00000000 00000000 00000000    ................
    4882c0f0: 00000000 00000000 00000000 00000000    ................
    =>

    I also made sure that the other timer15 potential pinmux was not configured:

                 - USB2_DRVBUS 0x4a00_3684 ---> 0x0009_0000

    I also tried setting this to 0x0000_000F (Driver off)

    Billa

  • Just so I'm clear, those digital captures on TIMER15 and TIMER3 are intended to operate from the A15 in Linux, right? Or is there thought of having them on the DSP? I've been searching for any kind of existing timestamp/capture driver for Linux. The only thing I've found so far that looks similar is at drivers/pwm/pwm-sti.c. It's not for TI devices, but it looks like it is a combination of supporting PWM or capture, which would be similar to what you'd need to do in pwm-omap-dmtimer.c if you wanted to do something similar.
  • I want them to run in DSP or M4 and right now I have them working.

    Thanks

    Billa