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.

AM4376: PRU_ICSS TIMER

Part Number: AM4376

Tool/software:

Hello,

Currently:

i have used hrtimer with Option CLOCK_MONOTONIC from kernel and it is working well.

Now:

I am trying to use CLOCK_MONOTONIC_RAW from kernel but it is not allowed me to use.

Is it getting used by PRU firmware? 

Below is the log when i am trying to access the module.

"root@am437x-evm:~# insmod ioctl_mod.ko 
[  129.033292] ioctl_mod: loading out-of-tree module taints kernel.
[  129.034684] Major = 240 Minor = 0 
[  129.048345] Allocating space to rtc structure ...Done!!!
[  129.048371] ------------[ cut here ]------------
[  129.048380] WARNING: CPU: 0 PID: 636 at kernel/time/hrtimer.c:1435 __hrtimer_init+0x100/0x104
[  129.048438] Invalid clockid 4. Using MONOTONIC
[  129.048448] Modules linked in: ioctl_mod(O+) irq_pruss_intc prueth hsr icss_iep pru_rproc pm33xx omap_des omap_aes_driver libdes omap_shaml
[  129.048617] CPU: 0 PID: 636 Comm: insmod Tainted: G        W  O      5.10.100-rt62-g204ec708dc #2
[  129.048647] Hardware name: Generic AM43 (Flattened Device Tree)
[  129.048673] [<c010d664>] (unwind_backtrace) from [<c010a044>] (show_stack+0x10/0x14)
[  129.048735] [<c010a044>] (show_stack) from [<c09feb30>] (__warn+0xbc/0xd4)
[  129.048784] [<c09feb30>] (__warn) from [<c09febdc>] (warn_slowpath_fmt+0x94/0xbc)
[  129.048824] [<c09febdc>] (warn_slowpath_fmt) from [<c018549c>] (__hrtimer_init+0x100/0x104)
[  129.048866] [<c018549c>] (__hrtimer_init) from [<bf08f14c>] (etx_driver_init+0x14c/0x1000 [ioctl_mod])
[  129.048973] [<bf08f14c>] (etx_driver_init [ioctl_mod]) from [<c0101660>] (do_one_initcall+0x7c/0x1cc)
[  129.049045] [<c0101660>] (do_one_initcall) from [<c019e7c4>] (do_init_module+0x5c/0x240)
[  129.049096] [<c019e7c4>] (do_init_module) from [<c01a0e5c>] (load_module+0x23b0/0x2614)
[  129.049140] [<c01a0e5c>] (load_module) from [<c01a12ec>] (sys_finit_module+0xb8/0xec)
[  129.049181] [<c01a12ec>] (sys_finit_module) from [<c0100060>] (ret_fast_syscall+0x0/0x5c)
[  129.049220] Exception stack(0xc3a3bfa8 to 0xc3a3bff0)
[  129.049248] bfa0:                   00000000 00035190 00000003 000227bc 00000000 00036188
[  129.049276] bfc0: 00000000 00035190 00000000 0000017b 0002034c 00000002 0002031c 00000000
[  129.049297] bfe0: befebc30 befebc20 0001b3c1 415060e2
[  129.049310] ---[ end trace 0000000000000003 ]---
root@am437x-evm:~# [  129.288105] Device Driver Insert...Done!!!

 

root@am437x-evm:~# 
CTRL-A Z for help | 115200 8N1 | NOR | Minicom 2.7.1 | VT102 | Offline | ttyUSB0                                   

"

what timer is being used by PRU_ICSS firmware.?

  • Hello Vrund,

    1) I suspect you are using clock_gettime? If not, what functions are you trying to use with CLOCK_MONOTONIC and CLOCK_MONOTONIC_RAW?

    2) I would be more suspicious of the line
    "Invalid clockid 4. Using MONOTONIC"

    I doubt that the PRU Ethernet firmware or driver is actually related to the behavior that you are observing. If you want to make sure, you can simply disable PRU Ethernet in your Linux devicetree file and see if you still run into issues.

    3) What version of the AM437x Linux SDK are you using?

    Regards,

    Nick

  • Hello Nick,

    1) At user space, clock_gettime works with both the option. ( CLOCK_MONOTONIC and CLOCK_MONOTONIC_RAW.)

    At kernel Level (During making of .ko file ) i am using hrtimer_init. With that CLOCK_MONOTONIC is working but CLOCK_MONOTONIC_RAW is not working. 

    SDK version is 8.02.

    regards,

    Vrund