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.

AM5728: Adding a timer to IPU1 is unsuccessful, ends in crash.

Part Number: AM5728
Other Parts Discussed in Thread: SYSBIOS, ADS1015

Environment
- AM5728 MPU is running Linux
- IPU1 is running bios and MessageQ server
- communication is based on ipc_3_47_02_00/examples/DRA7XX_linux_elf/ex02_messageq/ipu1

My goal is to run a timer in IPU1.

At first I added a piece of code to IPU1 Server.c to tell me which timers are available
nTimers = Timer_getNumTimers();
for (i=0, u32temp=0; i<nTimers; i++)
{
if (Timer_getStatus(i) != 0)
u32temp |= 1 << i;
}
// At this point u32temp=0x010C so GP Timers 3, 4 and 9 are available

My timer function in IPU1 is this

Void MyTimerTick(UArg arg0)
{
nTimerTicks++;
}

I tried two approaches to implement the timer. Each approach was unsuccessful.

Approach 1:
===========
Declare the timer in Ipu1.cfg as follows

Xbar.connectIRQMeta(53, 31);
/* var Timer = xdc.useModule('ti.sysbios.timers.dmtimer.Timer'); already done for bios Timer above */
var MyTimerParams = new Timer.Params();
MyTimerParams.instance.name = "MyTimerName";
MyTimerParams.period = 1000000;
MyTimerParams.periodType = xdc.module("ti.sysbios.interfaces.ITimer").PeriodType_MICROSECS;
MyTimerParams.extFreq.lo = 19200000;
Timer.create(3, "&MyTimerTick", MyTimerParams);

The IPU1 server gets built and loaded to Linux /lib/firmware/.
After rebooting the system I get this log and IPU1 is unresponsive.

[ 6.249448] remoteproc remoteproc0: 58820000.ipu is available
[ OK ] Started udev Coldplug all Devices.
[ 6.270838] omap-rproc 55020000.ipu: assigned reserved memory node ipu2-memory@95800000
[ OK ] Reached target System Initialization.
[ 6.309207] remoteproc remoteproc1: 55020000.ipu is available
[ 6.340174] remoteproc remoteproc1: Direct firmware load for dra7-ipu2-fw.xem4 failed with error -2
[ 6.354618] omap-rproc 40800000.dsp: assigned reserved memory node dsp1_cma@99000000
[ 6.354687] remoteproc remoteproc2: 40800000.dsp is available
[ 6.381302] remoteproc remoteproc0: powering up 58820000.ipu
[ 6.381315] remoteproc remoteproc0: Booting fw image dra7-ipu1-fw.xem4, size 3799716
[ 6.381428] omap-iommu 58882000.mmu: 58882000.mmu: version 2.1
[ 6.517774] remoteproc remoteproc1: powering up 55020000.ipu
[ 6.517804] remoteproc remoteproc1: Direct firmware load for dra7-ipu2-fw.xem4 failed with error -2
[ 6.517810] remoteproc remoteproc1: request_firmware failed: -2
[ 6.558662] omap-des 480a5000.des: OMAP DES hw accel rev: 2.2
[ 6.559012] virtio_rpmsg_bus virtio0: rpmsg host is online
[ 6.559091] remoteproc remoteproc0: registered virtio0 (type 7)
[ 6.559100] remoteproc remoteproc0: remote processor 58820000.ipu is now up
[ 6.561122] ------------[ cut here ]------------
[ 6.561138] WARNING: CPU: 0 PID: 205 at /kernel-source//drivers/bus/omap_l3_noc.c:147 l3_interrupt_handler+0x25c/0x378
[ 6.561145] 44000000.ocp:L3 Custom Error: MASTER IPU1 TARGET L4_PER1_P3 (Idle): Data Access in Supervisor mode during Functional access
[ 6.561147] Modules linked in: omap_des(+) des_generic crypto_engine omap_crypto omap_remoteproc virtio_rpmsg_bus rpmsg_core remoteproc sch_fq_codel cryptodev(O) cmemk(O)
[ 6.561185] CPU: 0 PID: 205 Comm: systemd-udevd Tainted: G W O 4.14.54-ge0103eeb5d #2
[ 6.561188] Hardware name: Generic DRA74X (Flattened Device Tree)
[ 6.561192] Backtrace:
[ 6.561203] [<c020b808>] (dump_backtrace) from [<c020baec>] (show_stack+0x18/0x1c)
[ 6.561210] r7:00000009 r6:60030193 r5:00000000 r4:c10568dc
[ 6.561219] [<c020bad4>] (show_stack) from [<c095d444>] (dump_stack+0x90/0xa4)
[ 6.561232] [<c095d3b4>] (dump_stack) from [<c022b9ec>] (__warn+0xec/0x104)
[ 6.561238] r7:00000009 r6:c0bdc924 r5:00000000 r4:eccbbaa0
[ 6.561246] [<c022b900>] (__warn) from [<c022ba44>] (warn_slowpath_fmt+0x40/0x48)
[ 6.561250] r9:00000006 r8:ee9f0090 r7:c0bdccc0 r6:00000000 r5:c0bdc850 r4:c0bdc8f4
[ 6.561256] [<c022ba08>] (warn_slowpath_fmt) from [<c054489c>] (l3_interrupt_handler+0x25c/0x378)
[ 6.561259] r3:eea01ec0 r2:c0bdc8f4
[ 6.561261] r4:80080003
[ 6.561270] [<c0544640>] (l3_interrupt_handler) from [<c027ed64>] (__handle_irq_event_percpu+0x6c/0x134)
[ 6.561283] r10:c105830d r9:eea0c400 r8:00000017 r7:eccbbbc4 r6:00000000 r5:eea0c400
[ 6.561285] r4:ee9f0400
[ 6.561291] [<c027ecf8>] (__handle_irq_event_percpu) from [<c027ee50>] (handle_irq_event_percpu+0x24/0x60)
[ 6.561304] r10:eccbbdc8 r9:eccba000 r8:ee808000 r7:00000001 r6:c10092ec r5:eea0c400
[ 6.561307] r4:eea0c400
[ 6.561316] [<c027ee2c>] (handle_irq_event_percpu) from [<c027eecc>] (handle_irq_event+0x40/0x64)
[ 6.561322] r5:eea0c464 r4:eea0c400
[ 6.561329] [<c027ee8c>] (handle_irq_event) from [<c02827a0>] (handle_fasteoi_irq+0xac/0x160)
[ 6.561332] r7:00000001 r6:c10092ec r5:eea0c464 r4:eea0c400
[ 6.561338] [<c02826f4>] (handle_fasteoi_irq) from [<c027dfb0>] (generic_handle_irq+0x2c/0x3c)
[ 6.561342] r7:00000001 r6:00000000 r5:00000000 r4:c0e64afc
[ 6.561348] [<c027df84>] (generic_handle_irq) from [<c027e538>] (__handle_domain_irq+0x64/0xbc)
[ 6.561353] [<c027e4d4>] (__handle_domain_irq) from [<c020146c>] (gic_handle_irq+0x44/0x80)
[ 6.561358] r9:eccba000 r8:fa213000 r7:fa212000 r6:eccbbc80 r5:fa21200c r4:c1004000
[ 6.561363] [<c0201428>] (gic_handle_irq) from [<c020c6b8>] (__irq_svc+0x58/0x8c)
[ 6.561367] Exception stack(0xeccbbc80 to 0xeccbbcc8)
[ 6.561372] bc80: eff16ca4 00000000 ffffffb0 eccbbd44 0051c000 ffefe8e0 eff16ca4 c0c3f000
[ 6.561376] bca0: fa221f5f 00e00000 eccbbdc8 eccbbd6c ece3f750 eccbbcd0 c030b050 c0317b54
[ 6.561379] bcc0: 20030013 ffffffff
[ 6.561383] r9:eccba000 r8:fa221f5f r7:eccbbcb4 r6:ffffffff r5:20030013 r4:c0317b54
[ 6.561391] [<c030ac10>] (unmap_page_range) from [<c030b3f0>] (unmap_single_vma+0x50/0x58)
[ 6.561395] r10:00000009 r9:ed6dc380 r8:00000000 r7:00000000 r6:eccbbdc8 r5:ffffffff
[ 6.561397] r4:ece3f750
[ 6.561402] [<c030b3a0>] (unmap_single_vma) from [<c030b6ac>] (unmap_vmas+0x5c/0x70)
[ 6.561404] r4:ece3f750
[ 6.561411] [<c030b650>] (unmap_vmas) from [<c0312d44>] (exit_mmap+0xb8/0x170)
[ 6.561415] r8:ece2564c r7:ecf48a80 r6:ecd6ef00 r5:00000000 r4:ece3fe38
[ 6.561421] [<c0312c8c>] (exit_mmap) from [<c0229020>] (mmput+0x48/0xe4)
[ 6.561423] r5:00000000 r4:ed6dc380
[ 6.561430] [<c0228fd8>] (mmput) from [<c03419cc>] (flush_old_exec+0x4b4/0x6f0)
[ 6.561433] r5:ed6dc380 r4:ece25100
[ 6.561439] [<c0341518>] (flush_old_exec) from [<c038bb24>] (load_elf_binary+0x2b8/0x1224)
[ 6.561443] r10:00000009 r9:00000000 r8:ece02600 r7:eccbbe80 r6:00000034 r5:ecd6ef00
[ 6.561446] r4:ed767d80
[ 6.561451] [<c038b86c>] (load_elf_binary) from [<c0341c74>] (search_binary_handler.part.3+0x6c/0x234)
[ 6.561455] r10:ecf48a80 r9:00000000 r8:fffffff8 r7:c108b634 r6:c101d3a0 r5:ecd6ef00
[ 6.561457] r4:c101d890
[ 6.561462] [<c0341c08>] (search_binary_handler.part.3) from [<c0342680>] (do_execveat_common+0x590/0x678)
[ 6.561465] r9:00000000 r8:ecd6ef00 r7:000000cd r6:ffffe000 r5:ece25100 r4:ed7b2000
[ 6.561470] [<c03420f0>] (do_execveat_common) from [<c03429bc>] (SyS_execve+0x38/0x40)
[ 6.561474] r10:00000000 r9:eccba000 r8:c02080c4 r7:0000000b r6:be87e970 r5:004dca60
[ 6.561476] r4:be87e9f0
[ 6.561483] [<c0342984>] (SyS_execve) from [<c0207ee0>] (ret_fast_syscall+0x0/0x4c)
[ 6.561485] r5:b6f8edbc r4:be87eff8
[ 6.561489] ---[ end trace 893351ee8228e39a ]---
[ 6.566076] omap-des 480a5000.des: will run requests pump with realtime priority
[ 6.566194] omap-rproc 58820000.ipu: omap rproc 58820000.ipu crashed
[ 6.566200] remoteproc remoteproc0: crash detected in 58820000.ipu: type fatal error
[ 6.566208] remoteproc remoteproc0: handling crash #1 in 58820000.ipu
[ 6.566213] remoteproc remoteproc0: recovering 58820000.ipu
[ 6.569545] remoteproc remoteproc0: stopped remote processor 58820000.ipu
[ 6.569550] remoteproc remoteproc0: powering up 58820000.ipu
[ 6.598701] remoteproc remoteproc0: Booting fw image dra7-ipu1-fw.xem4, size 3799716
[ 6.598816] omap-iommu 58882000.mmu: 58882000.mmu: version 2.1
[ 6.640654] ------------[ cut here ]------------
[ 6.640669] WARNING: CPU: 0 PID: 220 at /kernel-source//drivers/bus/omap_l3_noc.c:147 l3_interrupt_handler+0x25c/0x378
[ 6.640674] 44000000.ocp:L3 Custom Error: MASTER IPU1 TARGET L4_PER1_P3 (Idle): Data Access in Supervisor mode during Functional access
[ 6.640677] Modules linked in: omap_des(+) des_generic crypto_engine omap_crypto omap_remoteproc virtio_rpmsg_bus rpmsg_core remoteproc sch_fq_codel cryptodev(O) cmemk(O)
[ 6.640720] CPU: 0 PID: 220 Comm: modprobe Tainted: G W O 4.14.54-ge0103eeb5d #2
[ 6.640722] Hardware name: Generic DRA74X (Flattened Device Tree)
[ 6.640726] Backtrace:
[ 6.640737] [<c020b808>] (dump_backtrace) from [<c020baec>] (show_stack+0x18/0x1c)
[ 6.640743] r7:00000009 r6:600d0193 r5:00000000 r4:c10568dc
[ 6.640753] [<c020bad4>] (show_stack) from [<c095d444>] (dump_stack+0x90/0xa4)
[ 6.640770] [<c095d3b4>] (dump_stack) from [<c022b9ec>] (__warn+0xec/0x104)
[ 6.640776] r7:00000009 r6:c0bdc924 r5:00000000 r4:ece39b70
[ 6.640783] [<c022b900>] (__warn) from [<c022ba44>] (warn_slowpath_fmt+0x40/0x48)
[ 6.640788] r9:00000006 r8:ee9f0090 r7:c0bdccc0 r6:00000000 r5:c0bdc850 r4:c0bdc8f4
[ 6.640796] [<c022ba08>] (warn_slowpath_fmt) from [<c054489c>] (l3_interrupt_handler+0x25c/0x378)
[ 6.640800] r3:eea01ec0 r2:c0bdc8f4
[ 6.640803] r4:80080003
[ 6.640815] [<c0544640>] (l3_interrupt_handler) from [<c027ed64>] (__handle_irq_event_percpu+0x6c/0x134)
[ 6.640820] r10:c105830d r9:eea0c400 r8:00000017 r7:ece39c94 r6:00000000 r5:eea0c400
[ 6.640824] r4:ee9f0400
[ 6.640830] [<c027ecf8>] (__handle_irq_event_percpu) from [<c027ee50>] (handle_irq_event_percpu+0x24/0x60)
[ 6.640834] r10:ee803240 r9:ece38000 r8:ee808000 r7:00000001 r6:c10092ec r5:eea0c400
[ 6.640838] r4:eea0c400
[ 6.640843] [<c027ee2c>] (handle_irq_event_percpu) from [<c027eecc>] (handle_irq_event+0x40/0x64)
[ 6.640848] r5:eea0c464 r4:eea0c400
[ 6.640855] [<c027ee8c>] (handle_irq_event) from [<c02827a0>] (handle_fasteoi_irq+0xac/0x160)
[ 6.640860] r7:00000001 r6:c10092ec r5:eea0c464 r4:eea0c400
[ 6.640867] [<c02826f4>] (handle_fasteoi_irq) from [<c027dfb0>] (generic_handle_irq+0x2c/0x3c)
[ 6.640870] r7:00000001 r6:00000000 r5:00000000 r4:c0e64afc
[ 6.640877] [<c027df84>] (generic_handle_irq) from [<c027e538>] (__handle_domain_irq+0x64/0xbc)
[ 6.640883] [<c027e4d4>] (__handle_domain_irq) from [<c020146c>] (gic_handle_irq+0x44/0x80)
[ 6.640887] r9:ece38000 r8:fa213000 r7:fa212000 r6:ece39d50 r5:fa21200c r4:c1004000
[ 6.640893] [<c0201428>] (gic_handle_irq) from [<c020c6b8>] (__irq_svc+0x58/0x8c)
[ 6.640896] Exception stack(0xece39d50 to 0xece39d98)
[ 6.640901] 9d40: 00000000 00000000 00000100 600d0013
[ 6.640906] 9d60: 00000000 ef44d348 ffffe000 00000001 8080007e ed6c2de0 ee803240 ece39e2c
[ 6.640912] 9d80: 00000000 ece39da0 c0328d28 c0328d5c 600d0013 ffffffff
[ 6.640918] r9:ece38000 r8:8080007e r7:ece39d84 r6:ffffffff r5:600d0013 r4:c0328d5c
[ 6.640926] [<c0328b98>] (__slab_free.constprop.5) from [<c03295b0>] (kmem_cache_free+0x1e8/0x1ec)
[ 6.640931] r10:ecdf0038 r9:ece33edc r8:00003f52 r7:ffffe000 r6:ed6c2ac0 r5:ef44d348
[ 6.640934] r4:ee803240
[ 6.640940] [<c03293c8>] (kmem_cache_free) from [<c031868c>] (unlink_anon_vmas+0x160/0x20c)
[ 6.640944] r8:ece33edc r7:ece33ee4 r6:00000100 r5:00000200 r4:c10894e0
[ 6.640953] [<c031852c>] (unlink_anon_vmas) from [<c030a8c0>] (free_pgtables+0x80/0xd4)
[ 6.640957] r10:00000000 r9:bf000000 r8:00002000 r7:ece39ed8 r6:00010000 r5:ece33f70
[ 6.640960] r4:ece33ea0
[ 6.640967] [<c030a840>] (free_pgtables) from [<c0312d58>] (exit_mmap+0xcc/0x170)
[ 6.640972] r9:ecf49a7c r8:00000000 r7:0000054c r6:ffffe000 r5:00000000 r4:ecdf2b60
[ 6.640979] [<c0312c8c>] (exit_mmap) from [<c0229020>] (mmput+0x48/0xe4)
[ 6.640982] r5:00000000 r4:ecf49a40
[ 6.640989] [<c0228fd8>] (mmput) from [<c022fac0>] (do_exit+0x774/0xa7c)
[ 6.640992] r5:ecf49a40 r4:ece25100
[ 6.640997] [<c022f34c>] (do_exit) from [<c022fe4c>] (do_group_exit+0x48/0xc4)
[ 6.640999] r7:000000f8
[ 6.641004] [<c022fe04>] (do_group_exit) from [<c022fee0>] (__wake_up_parent+0x0/0x28)
[ 6.641007] r7:000000f8 r6:b6f6778c r5:00000001 r4:b6f6778c
[ 6.641014] [<c022fec8>] (SyS_exit_group) from [<c0207ee0>] (ret_fast_syscall+0x0/0x4c)
[ 6.641018] ---[ end trace 893351ee8228e39b ]---
[ 6.641329] omap-rproc 58820000.ipu: omap rproc 58820000.ipu crashed
[ 6.641335] remoteproc remoteproc0: crash detected in 58820000.ipu: type fatal error

Approach 2:
===========
Don't modify Ipu1.cfg. Add the following to Server.c and execute it when triggered to do so.
  Timer_Params_init(&TimerParams);
  TimerParams.arg = 1;
  TimerParams.period = 1000000;
  TimerParams.periodType = Timer_PeriodType_MICROSECS;
  TimerParams.runMode = Timer_RunMode_CONTINUOUS;
  //TimerParams.startMode = Timer_StartMode_AUTO;
  TimerParams.startMode = Timer_StartMode_USER;
  Timer_create(Timer_ANY, MyTimerTick, &TimerParams, &eb);
  //Timer_create(3, MyTimerTick, &TimerParams, &eb); // Try GP Timer 4

The commented out lines show alternate code I tried.
I use a MessageQ message to trigger the above code execution. Immediately I get the dump shown below.

Is something needed to be configured on MPU side to fix the problem or what else am I missing?

Please help,
John

--> main:
main: Send command = 2 to IPU1
--> Main_main:
--> App_create: remoteProcId = 2
MessageQ_create returned 0x27708
App_create: msgqName = IPU1:MsgQ:01
[ 57.744640] c_can_platform 4ae3c000.can can0: setting BTR=1c04 BRPE=0000
[ 57.762754] can: controller area network core (rev 20170425 abi 9)
[ 57.769224] NET: Registered protocol family 29
[ 57.779698] can: raw protocol (rev 20170425)
[ 57.786548] c_can_platform 4ae3c000.can can0: setting BTR=1c04 BRPE=0000
[ 57.955289] c_can_platform 4ae3c000.can can0: bus-off
App_create: MessageQ_open returns 0x0[ 58.101530] ------------[ cut here ]------------
[ 58.109078] WARNING: CPU: 0 PID: 2899 at /kernel-source//drivers/bus/omap_l3_noc.c:147 l3_interrupt_handler+0x25c/0x378
[ 58.119907] 44000000.ocp:L3 Custom Error: MASTER IPU1 TARGET L4_PER1_P3 (Idle): Data Access in Supervisor mode during Functional access
[ 58.132126] Modules linked in: can_raw can bnep sha512_generic sha512_arm sha256_generic sha1_generic sha1_arm_neon sha1_arm md5 cbc aes_arm_bs crypto_simd cryptd bc_example(O) xhci_plat_hcd xhci_hcd pru_rproc usbcore pruss_intc unified_kbd(O) pruss rpmsg_proto dwc3 udc_core usb_common bluetooth ecdh_generic pvrsrvkm(O) omap_aes_driver c_can_platform omap_sham c_can pruss_soc_bus can_dev omap_wdt ti_vpe ti_sc ti_csc ti_vpdma dwc3_omap omap_des des_generic crypto_engine omap_crypto omap_remoteproc virtio_rpmsg_bus rpmsg_core remoteproc sch_fq_codel cryptodev(O) cmemk(O)
[ 58.182876] CPU: 0 PID: 2899 Comm: appLaunch.sh Tainted: G W O 4.14.54-ge0103eeb5d #2
[ 58.191695] Hardware name: Generic DRA74X (Flattened Device Tree)
[ 58.197809] Backtrace:
[ 58.200271] [<c020b808>] (dump_backtrace) from [<c020baec>] (show_stack+0x18/0x1c)
[ 58.207871] r7:00000009 r6:600d0193 r5:00000000 r4:c10568dc
[ 58.213558] [<c020bad4>] (show_stack) from [<c095d444>] (dump_stack+0x90/0xa4)
[ 58.220815] [<c095d3b4>] (dump_stack) from [<c022b9ec>] (__warn+0xec/0x104)
[ 58.227803] r7:00000009 r6:c0bdc924 r5:00000000 r4:e37fbc70
[ 58.233486] [<c022b900>] (__warn) from [<c022ba44>] (warn_slowpath_fmt+0x40/0x48)
[ 58.241000] r9:00000006 r8:ee9f0090 r7:c0bdccc0 r6:00000000 r5:c0bdc850 r4:c0bdc8f4
[ 58.248775] [<c022ba08>] (warn_slowpath_fmt) from [<c054489c>] (l3_interrupt_handler+0x25c/0x378)
[ 58.257681] r3:eea01ec0 r2:c0bdc8f4
[ 58.261266] r4:80080003
[ 58.263810] [<c0544640>] (l3_interrupt_handler) from [<c027ed64>] (__handle_irq_event_percpu+0x6c/0x134)
[ 58.273327] r10:c105830d r9:eea0c400 r8:00000017 r7:e37fbd94 r6:00000000 r5:eea0c400
[ 58.281185] r4:ee9f0400
[ 58.283727] [<c027ecf8>] (__handle_irq_event_percpu) from [<c027ee50>] (handle_irq_event_percpu+0x24/0x60)
[ 58.293419] r10:0026f538 r9:e37fa000 r8:ee808000 r7:00000001 r6:c10092ec r5:eea0c400
[ 58.301277] r4:eea0c400
[ 58.303818] [<c027ee2c>] (handle_irq_event_percpu) from [<c027eecc>] (handle_irq_event+0x40/0x64)
[ 58.312724] r5:eea0c464 r4:eea0c400
[ 58.316313] [<c027ee8c>] (handle_irq_event) from [<c02827a0>] (handle_fasteoi_irq+0xac/0x160)
[ 58.324869] r7:00000001 r6:c10092ec r5:eea0c464 r4:eea0c400
[ 58.330552] [<c02826f4>] (handle_fasteoi_irq) from [<c027dfb0>] (generic_handle_irq+0x2c/0x3c)
[ 58.339196] r7:00000001 r6:00000000 r5:00000000 r4:c0e64afc
[ 58.344876] [<c027df84>] (generic_handle_irq) from [<c027e538>] (__handle_domain_irq+0x64/0xbc)
[ 58.353610] [<c027e4d4>] (__handle_domain_irq) from [<c020146c>] (gic_handle_irq+0x44/0x80)
[ 58.361995] r9:e37fa000 r8:fa213000 r7:fa212000 r6:e37fbe50 r5:fa21200c r4:c1004000
[ 58.369769] [<c0201428>] (gic_handle_irq) from [<c020c6b8>] (__irq_svc+0x58/0x8c)
[ 58.377280] Exception stack(0xe37fbe50 to 0xe37fbe98)
[ 58.382350] be40: 00000000 00020000 0026f538 00000000
[ 58.390561] be60: 0026f538 00000018 00000000 00000000 befff000 e2eb1600 0026f538 e37fbec4
[ 58.398770] be80: e37fbec8 e37fbea4 00020000 c0540ab8 a00d0013 ffffffff
[ 58.405410] r9:e37fa000 r8:befff000 r7:e37fbe84 r6:ffffffff r5:a00d0013 r4:c0540ab8
[ 58.413189] [<c0540a64>] (strnlen_user) from [<c0340574>] (copy_strings+0x80/0x3a8)
[ 58.420876] r8:befff000 r7:00000000 r6:befffb41 r5:00000018 r4:ef86f880
[ 58.427603] [<c03404f4>] (copy_strings) from [<c0342608>] (do_execveat_common+0x518/0x678)
[ 58.435901] r10:e3569180 r9:00000000 r8:e2eb1600 r7:00256b38 r6:0024e038 r5:00000000
[ 58.443760] r4:e3877000
[ 58.446301] [<c03420f0>] (do_execveat_common) from [<c03429bc>] (SyS_execve+0x38/0x40)
[ 58.454249] r10:00000000 r9:e37fa000 r8:c02080c4 r7:0000000b r6:00247a98 r5:00256b38
[ 58.462107] r4:0024e038
[ 58.464650] [<c0342984>] (SyS_execve) from [<c0207ee0>] (ret_fast_syscall+0x0/0x4c)
[ 58.472333] r5:000f5094 r4:0023f778
[ 58.475920] ---[ end trace e9e6ed313a471000 ]---

App_create: MessageQ for IPU1:MsgQ:01 = 131200
App_create: Ho[ 58.483690] omap-rproc 58820000.ipu: omap rproc 58820000.ipu crashed
st is ready
<-- App_create:
--> Ipu1Xchg:
sizeof(MULTI_TX3) =[ 58.493176] remoteproc remoteproc0: crash detected in 58820000.ipu: type fatal error
141
[ 58.511171] remoteproc remoteproc0: handling crash #1 in 58820000.ipu
[ 58.517744] remoteproc remoteproc0: recovering 58820000.ipu
[ 58.526881] remoteproc remoteproc0: stopped remote processor 58820000.ipu
[ 58.533949] remoteproc remoteproc0: powering up 58820000.ipu
recvfrom failed: Link has been severed (67)
rpmsgThreadFxn: transportGet failed on fd 10, returned -20
ERROR: MessageQ_get returned = -20
<-- Ipu1Xchg:
<-- Main_main:

  • Hello John,

    1) What versions of software are you using? Linux, bios, etc.

    2) Please attach your Linux device tree

    3) Linux error code 2 sometimes means that the firmware path passed to RemoteProc is incorrect. (e.g. if firmware was at /lib/firmware/myDir/dra7-ipu2-fw.xem4, but you told RemoteProc the firmware was dra7-ipu2-fw.xem4 instead of myDir/dra7-ipu2-fw.xem4. In that case, RemoteProc would look for /lib/firmware/dra7-ipu2-fw.xem4 instead). Please verify the location and name of the firmware you want to load.

    4) You have a lot going on here. Let's ignore the timer for now. Can you get a known working case?

    Regards,

    Nick

  • Hello Nick,

    Answering your questions.

    1) What versions of software are you using? Linux, bios, etc.

    AM5728 MPU is running Linux

    Linux lix2019 4.14.54-ge0103eeb5d #2 SMP PREEMPT Wed Mar 13 17:35:35 UTC 2019 armv7l GNU/Linux

    The bios comes from this install

    ti-processor-sdk-rtos-am57xx-evm-05.00.00.15-Linux-x86-Install.bin

    2) Please attach your Linux device tree

    lix2019-dev.dts.txt
    /dts-v1/;
    #include "dra74x.dtsi"
    #include "lix2019-idk-common.dtsi"
    #include "dra74x-mmc-iodelay.dtsi"
    #include "dra7-ipu-dsp-common.dtsi"
    #include <dt-bindings/gpio/gpio.h>
    #include <dt-bindings/interrupt-controller/irq.h>
    
    
    / {
    	model = "TI AM5728 IDK";
    	compatible = "ti,am5728-idk", "ti,am5728", "ti,dra742", "ti,dra74",
    		     "ti,dra7", "ti,lix2019-dev";
    
    	aliases {
    		display0 = &lcd0;
    	};
    
    	memory@0 {
    		device_type = "memory";
    		reg = <0x0 0x80000000 0x0 0x80000000>; /* 2GB */
    	};
    	
    	lcd0: connector@0 {
    		      status = "okay";
    		      compatible = "panel-dpi";
    		      label = "lcd";
    
    		      panel-timing {
                ...
    		      };
    	      port {
    			lcd_in: endpoint {
    				remote-endpoint = <&dpi_out>;
    			};
    	      };
    	};
    
    	ocp {
    		/delete-node/rtc@48838000;
    	};
    
    };
    
    &cpu0 {
    	vdd-supply = <&smps12_reg>;
    };
    
    &mmc1 {
    	status = "okay";
    	vmmc-supply = <&v3_3d>;
    	vqmmc-supply = <&ldo1_reg>;
    	bus-width = <4>;
    
    	disable-wp;
    	cd-gpios = <&gpio6 27 GPIO_ACTIVE_LOW>; /* gpio 219 */
    
       ...
    };
    
    &mmc2 {
    	status = "okay";
    
       ...
    };
    
    &mmc3 {
    	status = "okay";
    
       ...
    };
    
    &qspi {
    	status = "okay";
    
    	spi-max-frequency = <76800000>;
    	m25p80@0 {
    		compatible = "s25fl256s1", "spi-flash";
    		spi-max-frequency = <76800000>;
    		reg = <0>;
    		spi-tx-bus-width = <1>;
    		spi-rx-bus-width = <4>;
    		#address-cells = <1>;
    		#size-cells = <1>;
    
    		/* MTD partition table.
    		 * The ROM checks the first four physical blocks
    		 * for a valid file to boot and the flash here is
    		 * 64KiB block size.
    		 *
    		 * If we're going to use the QSPI we need to fix this.
    		 *
    		 * 16 MBytes total length
    		 */
    
    		partition@0 {
    			label = "...";
    			reg = <0x00000000 0x000020000>;
    		};
    		partition@1 {
    			label = "...";
    			reg = <0x00020000 0x00008000>;
    		};
    		partition@2 {
    			label = "...";
    			reg = <0x00028000 0x00008000>;
    		};
    		partition@3 {
    			label = "...";
    			reg = <0x00030000 0x00010000>;
    		};
    		partition@4 {
    			label = "...";
    			reg = <0x00040000 0x00100000>;
    		};
    		partition@5 {
    			label = "...";
    			reg = <0x00140000 0x00080000>;
    		};
    		partition@6 {
    			label = "...";
    			reg = <0x001c0000 0x00010000>;
    		};
    		partition@7 {
    			label = "...";
    			reg = <0x001d0000 0x0010000>;
    		};
    		partition@8 {
    			label = "...";
    			reg = <0x001e0000 0x0800000>;
    		};
    		partition@9 {
    			label = "...";
    			reg = <0x009e0000 0x01620000>;
    		};
    
    	};
    };
    
    &uart3 {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&uart3_pins_default>;
    };
    
    &uart4 {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&uart4_pins_default>;
    };
    
    &uart5 {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&uart5_pins_default>;
    };
    
    &uart8 {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&uart8_pins_default>;
    };
    
    &dcan1 {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&dcan1_pins_default>;
    };
    
    /* No Sata on this device */
    &sata_phy {
    	status = "disabled";
    };
    
    /* No HDMI on this device */
    &hdmi {
    	status = "disabled";
    };
    
    &dra7_pmx_core {
    	uart3_pins_default: uart3_pins_default {
    	        pinctrl-single,pins = <
    			DRA7XX_CORE_IOPAD(0x3648, MUX_MODE0 | PIN_INPUT_PULLUP) /* uart3_rxd.uart3_rxd */
    			DRA7XX_CORE_IOPAD(0x364C, MUX_MODE0 | PIN_OUTPUT_PULLUP) /* uart3_txd.uart3_txd */
    	        >;
    	};
    
    	uart4_pins_default: uart4_pins_default {
    	        pinctrl-single,pins = <
    			DRA7XX_CORE_IOPAD(0x373C, MUX_MODE4 | PIN_INPUT_PULLUP) /* mcasp4_axr0.uart3_rxd */
    			DRA7XX_CORE_IOPAD(0x3740, MUX_MODE4 | PIN_OUTPUT_PULLUP) /* mcasp4_axr1.uart3_txd */
    	        >;
    	};
    
    	uart5_pins_default: uart5_pins_default {
    	        pinctrl-single,pins = <
    			DRA7XX_CORE_IOPAD(0x37C8, MUX_MODE2 | PIN_INPUT_PULLUP)  /* spi2_d0.uart5_rxd  */
    			DRA7XX_CORE_IOPAD(0x37CC, MUX_MODE2 | PIN_OUTPUT_PULLUP) /* spi2_cs0.uart5_txd */
    	        >;
    	};
    
    	uart8_pins_default: uart8_pins_default {
    	        pinctrl-single,pins = <
    			DRA7XX_CORE_IOPAD(0x3738, MUX_MODE3 | PIN_OUTPUT_PULLUP)  /* mcasp4_fsx.uart8_txd */
    			DRA7XX_CORE_IOPAD(0x3734, MUX_MODE3 | PIN_INPUT_PULLUP) /* mcasp4_aclkx.uart8_rxd */
    	        >;
    	};
    
    	dcan1_pins_default: dcan1_pins_default {
    	        pinctrl-single,pins = <
                            DRA7XX_CORE_IOPAD(0x37D0, MUX_MODE0 | PIN_OUTPUT)  /* dcan1_tx.dcan1_tx */
    		        DRA7XX_CORE_IOPAD(0x37D4, MUX_MODE0 | PIN_INPUT) /* dcan1_rx.dcan1_rx */
    
    	        >;
    	};
    
    
    };
    
    &gpu {
    	status = "ok";
    };
    
    &dss {
    	status = "ok";
    	vdda_video-supply = <&ldo2_reg>;
    
    	ports {
    		#address-cells = <1>;
    		#size-cells = <0>;
    
    		port {
    			reg = <0>;
    			dpi_out: endpoint {
    				remote-endpoint = <&lcd_in>;
    				data-lines = <24>;
    			};
    		};
    
    	};
    };

    lix2019-idk-common.dtsi.txt
    /*
     * Copyright (C) 2015-2016 Texas Instruments Incorporated - http://www.ti.com/
     *
     * This program is free software; you can redistribute it and/or modify
     * it under the terms of the GNU General Public License version 2 as
     * published by the Free Software Foundation.
     */
    
    #include "am57xx-industrial-grade.dtsi"
    
    / {
    	chosen {
    		stdout-path = &uart3;
    	};
    
    	reserved-memory {
    		#address-cells = <2>;
    		#size-cells = <2>;
    		ranges;
    
                    cmem_block_mem_0: cmem_block_mem@ba300000 {
                            compatible = "shared-dma-pool";
                            reg = <0x0 0xba300000 0x0 0x00400000>;
                            no-map;
                            status = "okay";
                    };
    
                    dsp1_cma_pool: dsp1_cma@99000000 {
                            compatible = "shared-dma-pool";
                            reg = <0x0 0x99000000 0x0 0x02000000>;
    			no-map;
                            status = "okay";
                    };
    
    		ipu1_memory_region: ipu1-memory@9d000000 {
    			compatible = "shared-dma-pool";
    			reg = <0x0 0x9d000000 0x0 0x2000000>;
    			reusable;
    			status = "okay";
    		};
    
    		ipu2_memory_region: ipu2-memory@95800000 {
    			compatible = "shared-dma-pool";
    			reg = <0x0 0x95800000 0x0 0x3800000>;
    			reusable;
    			status = "okay";
    		};
    
    	};
    
            cmem {
    		compatible = "ti,cmem";  // must be "ti,cmem"
    		#address-cells = <1>;
    		#size-cells = <0>;
    
    		status = "okay";
    
                    cmem_block_0: cmem_block@0 {
                            reg = <0>;
                            memory-region = <&cmem_block_mem_0>;
                            cmem-buf-pools = <1 0x00400000>; // 1x4MB
                    };
    
                    cmem_block_1: cmem_block@1 {
                            reg = <1>;
                            memory-region = <&dsp1_cma_pool>;
                            cmem-buf-pools = <1 0x02000000>;
                    };
            };
    
    	vmain: fixedregulator-vmain {
    		compatible = "regulator-fixed";
    		regulator-name = "VMAIN";
    		regulator-min-microvolt = <5000000>;
    		regulator-max-microvolt = <5000000>;
    		regulator-always-on;
    		regulator-boot-on;
    	};
    
    	v3_3d: fixedregulator-v3_3d {
    		compatible = "regulator-fixed";
    		regulator-name = "V3_3D";
    		vin-supply = <&smps9_reg>;
    		regulator-min-microvolt = <3300000>;
    		regulator-max-microvolt = <3300000>;
    		regulator-always-on;
    		regulator-boot-on;
    	};
    
    };
    
    &i2c1 {
    	status = "okay";
    	clock-frequency = <400000>;
    
    	tps659038: tps659038@58 {
    		compatible = "ti,tps659038";
    		reg = <0x58>;
    		interrupts-extended = <&gpio6 16 IRQ_TYPE_LEVEL_HIGH
    			       &dra7_pmx_core 0x418>;
    		#interrupt-cells = <2>;
    		interrupt-controller;
    		ti,system-power-controller;
    		ti,palmas-override-powerhold;
    
    		tps659038_pmic {
    			compatible = "ti,tps659038-pmic";
    
    			smps12-in-supply = <&vmain>;
    			smps3-in-supply = <&vmain>;
    			smps45-in-supply = <&vmain>;
    			smps6-in-supply = <&vmain>;
    			smps7-in-supply = <&vmain>;
    			smps8-in-supply = <&vmain>;
    			smps9-in-supply = <&vmain>;
    			ldo1-in-supply = <&vmain>;
    			ldo2-in-supply = <&vmain>;
    			ldo3-in-supply = <&vmain>;
    			ldo4-in-supply = <&vmain>;
    			ldo9-in-supply = <&vmain>;
    			ldoln-in-supply = <&vmain>;
    			ldousb-in-supply = <&vmain>;
    			ldortc-in-supply = <&vmain>;
    
    			regulators {
    				smps12_reg: smps12 {
    					/* VDD_MPU */
    					regulator-name = "smps12";
    					regulator-min-microvolt = <850000>;
    					regulator-max-microvolt = <1250000>;
    					regulator-always-on;
    					regulator-boot-on;
    				};
    
    				smps3_reg: smps3 {
    					/* VDD_DDR EMIF1 EMIF2 */
    					regulator-name = "smps3";
    					regulator-min-microvolt = <1350000>;
    					regulator-max-microvolt = <1350000>;
    					regulator-always-on;
    					regulator-boot-on;
    				};
    
    				smps45_reg: smps45 {
    					/* VDD_DSPEVE on AM572 */
    					/* VDD_IVA + VDD_DSP on AM571 */
    					regulator-name = "smps45";
    					regulator-min-microvolt = <850000>;
    					regulator-max-microvolt = <1250000>;
    					regulator-always-on;
    					regulator-boot-on;
    				};
    
    				smps6_reg: smps6 {
    					/* VDD_GPU */
    					regulator-name = "smps6";
    					regulator-min-microvolt = <850000>;
    					regulator-max-microvolt = <1250000>;
    					regulator-always-on;
    					regulator-boot-on;
    				};
    
    				smps7_reg: smps7 {
    					/* VDD_CORE */
    					regulator-name = "smps7";
    					regulator-min-microvolt = <850000>;
    					regulator-max-microvolt = <1150000>;
    					regulator-always-on;
    					regulator-boot-on;
    				};
    
    				smps8_reg: smps8 {
    					/* 5728 - VDD_IVAHD */
    					/* 5718 - N.C. test point */
    					regulator-name = "smps8";
    				};
    
    				smps9_reg: smps9 {
    					/* VDD_3_3D */
    					regulator-name = "smps9";
    					regulator-min-microvolt = <3300000>;
    					regulator-max-microvolt = <3300000>;
    					regulator-always-on;
    					regulator-boot-on;
    				};
    
    				ldo1_reg: ldo1 {
    					/* VDDSHV8 - VSDMMC  */
    					/* NOTE: on rev 1.3a, data supply */
    					regulator-name = "ldo1";
    					regulator-min-microvolt = <1800000>;
    					regulator-max-microvolt = <3300000>;
    					regulator-boot-on;
    					regulator-always-on;
    				};
    
    				ldo2_reg: ldo2 {
    					/* VDDSH18V */
    					regulator-name = "ldo2";
    					regulator-min-microvolt = <1800000>;
    					regulator-max-microvolt = <1800000>;
    					regulator-always-on;
    					regulator-boot-on;
    				};
    
    				ldo3_reg: ldo3 {
    					/* R1.3a 572x V1_8PHY_LDO3: USB, SATA */
    					regulator-name = "ldo3";
    					regulator-min-microvolt = <1800000>;
    					regulator-max-microvolt = <1800000>;
    					regulator-always-on;
    					regulator-boot-on;
    				};
    
    				ldo4_reg: ldo4 {
    					/* R1.3a 572x V1_8PHY_LDO4: PCIE, HDMI*/
    					regulator-name = "ldo4";
    					regulator-min-microvolt = <1800000>;
    					regulator-max-microvolt = <1800000>;
    					regulator-always-on;
    					regulator-boot-on;
    				};
    
    				/* LDO5-8 unused */
    
    				ldo9_reg: ldo9 {
    					/* VDD_RTC  */
    					regulator-name = "ldo9";
    					regulator-min-microvolt = <840000>;
    					regulator-max-microvolt = <1160000>;
    					regulator-always-on;
    					regulator-boot-on;
    				};
    
    				ldoln_reg: ldoln {
    					/* VDDA_1V8_PLL */
    					regulator-name = "ldoln";
    					regulator-min-microvolt = <1800000>;
    					regulator-max-microvolt = <1800000>;
    					regulator-always-on;
    					regulator-boot-on;
    				};
    
    				ldousb_reg: ldousb {
    					/* VDDA_3V_USB: VDDA_USBHS33 */
    					regulator-name = "ldousb";
    					regulator-min-microvolt = <3300000>;
    					regulator-max-microvolt = <3300000>;
    					regulator-always-on;
    					regulator-boot-on;
    				};
    
    				ldortc_reg: ldortc {
    					/* VDDA_RTC  */
    					regulator-name = "ldortc";
    					regulator-min-microvolt = <1800000>;
    					regulator-max-microvolt = <1800000>;
    					regulator-always-on;
    					regulator-boot-on;
    				};
    
    				regen1: regen1 {
    					/* VDD_3V3_ON */
    					regulator-name = "regen1";
    					regulator-boot-on;
    					regulator-always-on;
    				};
    
    				regen2: regen2 {
    					/* Needed for PMIC internal resource */
    					regulator-name = "regen2";
    					regulator-boot-on;
    					regulator-always-on;
    				};
    			};
    		};
    
    		tps659038_gpio: tps659038_gpio {
    			compatible = "ti,palmas-gpio";
    			gpio-controller;
    			#gpio-cells = <2>;
    		};
    
    	};
    
    };
    
    &mac {
    	status = "okay";
    };
    
    &cpsw_emac0 {
    	phy_id = <&davinci_mdio>, <0>;
    	phy-mode = "rgmii";
    	dual_emac_res_vlan = <1>;
    };
    
    &mmc1 {
    	status = "okay";
    	vmmc-supply = <&v3_3d>;
    	vqmmc-supply = <&ldo1_reg>;
    	bus-width = <4>;
    };
    
    &gpu {
    	status = "disabled";
    };
    
    &pruss_soc_bus1 {
    	status = "okay";
    
    	pruss1: pruss@0 {
    		status = "okay";
    	};
    };
    
    &pruss_soc_bus2 {
    	status = "okay";
    
    	pruss2: pruss@0 {
    		status = "okay";
    	};
    };
    
    &ipu1 {
    	status = "okay";
    	memory-region = <&ipu1_memory_region>;
    };
    
    &ipu2 {
    	status = "okay";
    	memory-region = <&ipu2_memory_region>;
    };
    
    &dsp1 {
    	status = "okay";
    	memory-region = <&dsp1_cma_pool>;
    };
    
    /* No Sata on this device */
    &sata_phy {
    	status = "disabled";
    };
    
    &sata {
    	status = "disabled";
    };
    
    &usb2_phy2 {
    	phy-supply = <&ldousb_reg>;
    };
    
    &usb2 {
    	dr_mode = "host";
    };

    There is something weird about attaching a file. Instead of seeing the attached file I'm seeing a some kind of image. I decided to add a .txt extension to the files thinking this may help but I'm doubtful. If you can't see the files I attached please let me know and I will include their contents inline.

    3) Linux error code 2 sometimes means that the firmware path passed to RemoteProc is incorrect. (e.g. if firmware was at /lib/firmware/myDir/dra7-ipu2-fw.xem4, but you told RemoteProc the firmware was dra7-ipu2-fw.xem4 instead of myDir/dra7-ipu2-fw.xem4. In that case, RemoteProc would look for /lib/firmware/dra7-ipu2-fw.xem4 instead). Please verify the location and name of the firmware you want to load.

    We are going to use DSP1 and IPU1 only so binaries for DSP2 and IPU2 are not there. I'm having the following arrangement

    >ls -l /lib/firmware/dr*
    lrwxrwxrwx 1 root root 40 Jun 27 20:16 /lib/firmware/dra7-dsp1-fw.xe66 -> /lib/firmware/ti-coproc/server_dsp1.xe66
    lrwxrwxrwx 1 root root 40 Jun 27 20:16 /lib/firmware/dra7-ipu1-fw.xem4 -> /lib/firmware/ti-coproc/server_ipu1.xem4
    >ls -l /lib/firmware/ti-coproc/
    -rw-r--r-- 1 root root 4253196 Jun 27 20:18 server_dsp1.xe66
    -rw-r--r-- 1 root root 3821956 Jul 15 19:39 server_ipu1.xem4
    >

    This works well.

    4) You have a lot going on here. Let's ignore the timer for now. Can you get a known working case?

    I'm successfully building and executing DSP1 and IPU1 examples that involves MessageQ communication. As I indicated in my initial posting the server_ipu1.xem4 has been enhanced with calls to Timer_getNumTimers() and Timer_getStatus(). This way I know which timers are still available. This information is carried back to MPU by messages that I added. It's just the IPU1 call to Timer_create(Timer_ANY, &MyTimerTick, &TimerParams, &eb) that's causing a problem.

    I'm hoping this is what you wanted to know. Thank you for your time.

    Regards,

    John

  • This is an update.

    An engineer working on MPU side modified the following entry in the Linux device tree.

    &ipu1 {
      status = "okay";
      memory-region = <&ipu1_memory_region>;
    + timers = <&timer3>;
    };

    I have updated the IPU1 code Server.c to specifically reference timer 3

      Timer_Params_init(&TimerParams);
      TimerParams.arg = 1;
      TimerParams.period = 1000000;
      TimerParams.periodType = Timer_PeriodType_MICROSECS;
      TimerParams.runMode = Timer_RunMode_CONTINUOUS;
      TimerParams.startMode = Timer_StartMode_USER;
      pMsg->buf[0] = Timer_create(2, MyTimerTick, &TimerParams, &eb); // Try GP Timer 3 (index = 2)

    This attempt was not successful either but the error dump seems to be a bit smaller

    [ 107.516009] ------------[ cut here ]------------
    [ 107.523584] WARNING: CPU: 0 PID: 0 at /kernel-source//drivers/bus/omap_l3_noc.c:147 l3_interrupt_handler+0x25c/0x378
    [ 107.534153] 44000000.ocp:L3 Custom Error: MASTER IPU1 TARGET L4_PER1_P3 (Idle): Data Access in Supervisor mode during Functional access
    [ 107.546376] Modules linked in: can_raw can bnep sha512_generic sha512_arm sha256_generic sha1_generic sha1_arm_neon sha1_arm md5 cbc aes_arm_bs crypto_simd cryptd bc_example(O) xhci_plat_hcd xhci_hcd pru_rproc usbcore pruss_intc unified_kbd(O) rpmsg_proto pruss dwc3 udc_core usb_common bluetooth ecdh_generic pvrsrvkm(O) omap_aes_driver pruss_soc_bus c_can_platform omap_sham c_can can_dev omap_wdt ti_vpe ti_sc ti_csc ti_vpdma dwc3_omap omap_des atmel_mxt_ts des_generic ti_ads1015 crypto_engine omap_crypto omap_remoteproc virtio_rpmsg_bus rpmsg_core remoteproc sch_fq_codel cryptodev(O) cmemk(O)
    [ 107.599294] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G W O 4.14.54-ge0103eeb5d #2
    [ 107.607594] Hardware name: Generic DRA74X (Flattened Device Tree)
    [ 107.613711] Backtrace:
    [ 107.616177] [<c020b808>] (dump_backtrace) from [<c020baec>] (show_stack+0x18/0x1c)
    [ 107.623782] r7:00000009 r6:600f0193 r5:00000000 r4:c10568dc
    [ 107.629470] [<c020bad4>] (show_stack) from [<c095d444>] (dump_stack+0x90/0xa4)
    [ 107.636730] [<c095d3b4>] (dump_stack) from [<c022b9ec>] (__warn+0xec/0x104)
    [ 107.643722] r7:00000009 r6:c0bdc924 r5:00000000 r4:c1001cf0
    [ 107.649411] [<c022b900>] (__warn) from [<c022ba44>] (warn_slowpath_fmt+0x40/0x48)
    [ 107.656927] r9:00000006 r8:eea0e9d0 r7:c0bdccc0 r6:00000000 r5:c0bdc850 r4:c0bdc8f4
    [ 107.664707] [<c022ba08>] (warn_slowpath_fmt) from [<c054489c>] (l3_interrupt_handler+0x25c/0x378)
    [ 107.673616] r3:eea0e840 r2:c0bdc8f4
    [ 107.677205] r4:80080003
    [ 107.679753] [<c0544640>] (l3_interrupt_handler) from [<c027ed64>] (__handle_irq_event_percpu+0x6c/0x134)
    [ 107.689276] r10:c105830d r9:eea0f400 r8:00000017 r7:c1001e14 r6:00000000 r5:eea0f400
    [ 107.697137] r4:eea0ed40
    [ 107.699684] [<c027ecf8>] (__handle_irq_event_percpu) from [<c027ee50>] (handle_irq_event_percpu+0x24/0x60)
    [ 107.709380] r10:c1003ce4 r9:c1000000 r8:ee808000 r7:00000001 r6:c10092ec r5:eea0f400
    [ 107.717242] r4:eea0f400
    [ 107.719788] [<c027ee2c>] (handle_irq_event_percpu) from [<c027eecc>] (handle_irq_event+0x40/0x64)
    [ 107.728696] r5:eea0f464 r4:eea0f400
    [ 107.732289] [<c027ee8c>] (handle_irq_event) from [<c02827a0>] (handle_fasteoi_irq+0xac/0x160)
    [ 107.740852] r7:00000001 r6:c10092ec r5:eea0f464 r4:eea0f400
    [ 107.746539] [<c02826f4>] (handle_fasteoi_irq) from [<c027dfb0>] (generic_handle_irq+0x2c/0x3c)
    [ 107.755187] r7:00000001 r6:00000000 r5:00000000 r4:c0e64afc
    [ 107.760873] [<c027df84>] (generic_handle_irq) from [<c027e538>] (__handle_domain_irq+0x64/0xbc)
    [ 107.769613] [<c027e4d4>] (__handle_domain_irq) from [<c020146c>] (gic_handle_irq+0x44/0x80)
    [ 107.778000] r9:c1000000 r8:fa213000 r7:fa212000 r6:c1001ed0 r5:fa21200c r4:c1004000
    [ 107.785778] [<c0201428>] (gic_handle_irq) from [<c020c6b8>] (__irq_svc+0x58/0x8c)
    [ 107.793292] Exception stack(0xc1001ed0 to 0xc1001f18)
    [ 107.798364] 1ec0: 00000001 00000000 fe600000 00000000
    [ 107.806577] 1ee0: ffffe000 c1003cd8 c1003c78 00000000 00000000 c0e643b8 c1003ce4 c1001f2c
    [ 107.814789] 1f00: c1001f0c c1001f20 c0220044 c0208a64 600f0013 ffffffff
    [ 107.821433] r9:c1000000 r8:00000000 r7:c1001f04 r6:ffffffff r5:600f0013 r4:c0208a64
    [ 107.829215] [<c0208a3c>] (arch_cpu_idle) from [<c0977844>] (default_idle_call+0x28/0x34)
    [ 107.837343] [<c097781c>] (default_idle_call) from [<c026af74>] (do_idle+0x194/0x224)
    [ 107.845121] [<c026ade0>] (do_idle) from [<c026b2c8>] (cpu_startup_entry+0x20/0x24)
    [ 107.852724] r10:c0e4aa30 r9:c105b000 r8:ffffffff r7:c105b000 r6:00000000 r5:00000002
    [ 107.860585] r4:000000be
    [ 107.863132] [<c026b2a8>] (cpu_startup_entry) from [<c0972074>] (rest_init+0xd8/0xdc)
    [ 107.870915] [<c0971f9c>] (rest_init) from [<c0e00d98>] (start_kernel+0x3ec/0x3f8)
    [ 107.878428] r5:00000000 r4:c105b04c
    [ 107.882022] [<c0e009ac>] (start_kernel) from [<80008090>] (0x80008090)
    [ 107.888577] ---[ end trace 8a39542c66cf963c ]---
    App_create: MessageQ for IPU1:MsgQ:01 = 131200
    App_create: Host is ready
    <-- App_create:

    John

  • John,

    The device tree files already have timer assignments present.  Please refer to the file arch/arm/boot/dts/dra7-ipu-dsp-common.dtsi.  You will see that IPU2 is already using timer3 and IPU1 is already assigned to use timer11.

    Also, on the IPU side, generally the timer assignment and configuration is done in the Ipu.cfg file for sysbios.  Generally speaking you wouldn't need to write any code for this at all as it should be handled by the RTOS.

    The L3 error message you're getting is commonly seen when the IPU attempts to access the registers for a timer module whose corresponding clock is not enabled.  Linux handles the clock config based on the dts.

    Best regards,
    Brad

  • Hello John,

    I'm assuming Brad answered your question. If not, feel free to reply to continue the discussion.

    Regards,

    Nick

  • Hello,

    I have been pulled to a different project for couple of days. Will be returning to this one in a day or two.

    We have not found a solution yet.

    Regards,

    John

  • Hello,

    We now have the timer running in IPU1. The code I'm running is logically the same I provided in my first posting (approach 2). However, there is one important thing my coworker discovered. To get the timer running you have to also load the example code to IPU2. Why is that? We were not planning to use it so skipped the code loading. What would be needed to make the IPU1 timer running without loading IPU2?

    Interesting observation: Once you set up the timer for 1us ticks your MessageQ communication will not work. You have to significantly reduce params.blockSize in Ipu1.cfg.

    Regards,

    John

  • Hi John,

    Would you be able to provide us a test case to reproduce on our end?

    Regards,
    Sahin

  • Sahin,

    I will be back in the office on Monday and will discuss with my manager my further actions.

    Regards,

    John