TI中文支持网
TI专业的中文技术问题搜集分享网站

AM5728中DSP控制GPIO的问题

您好,

我们的使用模式是ARM跑linux,DSP端通过IPC和ARM通讯

DSP根据一定规则来控制GPIO动作,但每当DSP控制GPIO时,ARM端控制台就会报出一串错误如下

[ 128.664062] ————[ cut here ]————
[ 128.668721] WARNING: CPU: 0 PID: 0 at /oe/bld/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work-shared/am57xx-evm/kernel-source/drivers/bus/omap_l3_noc.c:147 l3_interrupt_handler+0x254/0x370
[ 128.686267] 44000000.ocp:L3 Custom Error: MASTER DSP1_MDMA TARGET L4_PER1_P3 (Read): Data Access in User mode during Functional access
[ 128.698403] Modules linked in: bc_example(O) c_can_platform c_can xhci_plat_hcd xhci_hcd pruss rpmsg_proto dwc3 udc_core snd_soc_simple_card snd_soc_simple_card_utils pwm_fan snd_soc_omap_hdmi_audio pvrsrvkm(O) omap_aes_driver pruss_soc_bus omap_sham can_dev omap_wdt ahci_platform libahci_platform libahci libata scsi_mod phy_omap_usb2 ti_vip ti_vpe ti_sc ti_csc ti_vpdma dwc3_omap gpio_pisosr ti_cal v4l2_fwnode omap_hdq wire omap_des des_generic crypto_engine omap_crypto omap_remoteproc virtio_rpmsg_bus rpmsg_core remoteproc sch_fq_codel uio_module_drv(O) uio ftdi_sio usbserial usbcore usb_common gdbserverproxy(O) cryptodev(O) cmemk(O)
[ 128.755075] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G W O 4.14.79-gbde58ab01e #1
[ 128.763374] Hardware name: Generic DRA72X (Flattened Device Tree)
[ 128.769492] Backtrace:
[ 128.771957] [<c020b4dc>] (dump_backtrace) from [<c020b7c0>] (show_stack+0x18/0x1c)
[ 128.779561] r7:00000009 r6:60000193 r5:00000000 r4:c1053d10
[ 128.785249] [<c020b7a8>] (show_stack) from [<c0931348>] (dump_stack+0x90/0xa4)
[ 128.792507] [<c09312b8>] (dump_stack) from [<c022b9cc>] (__warn+0xec/0x104)
[ 128.799499] r7:00000009 r6:c0bdb134 r5:00000000 r4:c1001cf0
[ 128.805184] [<c022b8e0>] (__warn) from [<c022ba24>] (warn_slowpath_fmt+0x40/0x48)
[ 128.812699] r9:00000006 r8:ef1eb9d0 r7:c0bdb484 r6:00000002 r5:c0bdb060 r4:c0bdb104
[ 128.820477] [<c022b9e8>] (warn_slowpath_fmt) from [<c051bd20>] (l3_interrupt_handler+0x254/0x370)
[ 128.829385] r3:ef1eb840 r2:c0bdb104
[ 128.832973] r4:80080003
[ 128.835521] [<c051bacc>] (l3_interrupt_handler) from [<c027f5a4>] (__handle_irq_event_percpu+0x6c/0x134)
[ 128.845041] r10:c105570d r9:ef1ed200 r8:00000017 r7:c1001e14 r6:00000000 r5:ef1ed200
[ 128.852902] r4:ef1ebd40
[ 128.855448] [<c027f538>] (__handle_irq_event_percpu) from [<c027f690>] (handle_irq_event_percpu+0x24/0x60)
[ 128.865143] r10:c1003ce8 r9:c1000000 r8:ef008000 r7:00000000 r6:c10093ac r5:ef1ed200
[ 128.873004] r4:ef1ed200
[ 128.875549] [<c027f66c>] (handle_irq_event_percpu) from [<c027f70c>] (handle_irq_event+0x40/0x64)
[ 128.884458] r5:ef1ed264 r4:ef1ed200
[ 128.888052] [<c027f6cc>] (handle_irq_event) from [<c0283020>] (handle_fasteoi_irq+0xac/0x160)
[ 128.896612] r7:00000000 r6:c10093ac r5:ef1ed264 r4:ef1ed200
[ 128.902299] [<c0282f74>] (handle_fasteoi_irq) from [<c027e7f4>] (generic_handle_irq+0x2c/0x3c)
[ 128.910946] r7:00000000 r6:00000000 r5:00000017 r4:c0e64b3c
[ 128.916632] [<c027e7c8>] (generic_handle_irq) from [<c027ed7c>] (__handle_domain_irq+0x64/0xbc)
[ 128.925370] [<c027ed18>] (__handle_domain_irq) from [<c0201474>] (gic_handle_irq+0x44/0x80)
[ 128.933757] r9:c1000000 r8:fa213000 r7:fa212000 r6:c1001ed0 r5:fa21200c r4:c1004000
[ 128.941535] [<c0201430>] (gic_handle_irq) from [<c020c378>] (__irq_svc+0x58/0x8c)
[ 128.949047] Exception stack(0xc1001ed0 to 0xc1001f18)
[ 128.954120] 1ec0: 00000001 00000000 fe600000 00000000
[ 128.962333] 1ee0: ffffe000 c1003cdc c1003c7c 00000000 00000000 c0e643f8 c1003ce8 c1001f2c
[ 128.970545] 1f00: c1001f0c c1001f20 c021ffe4 c02087ec 60000013 ffffffff
[ 128.977188] r9:c1000000 r8:00000000 r7:c1001f04 r6:ffffffff r5:60000013 r4:c02087ec
[ 128.984970] [<c02087c4>] (arch_cpu_idle) from [<c0949b1c>] (default_idle_call+0x28/0x34)
[ 128.993098] [<c0949af4>] (default_idle_call) from [<c026b544>] (do_idle+0x194/0x224)
[ 129.000875] [<c026b3b0>] (do_idle) from [<c026b898>] (cpu_startup_entry+0x20/0x24)
[ 129.008477] r10:c0e4aa30 r9:c1058000 r8:ffffffff r7:c1058000 r6:00000000 r5:00000002
[ 129.016339] r4:000000be
[ 129.018886] [<c026b878>] (cpu_startup_entry) from [<c094433c>] (rest_init+0xd8/0xdc)
[ 129.026666] [<c0944264>] (rest_init) from [<c0e00d9c>] (start_kernel+0x3ec/0x3f8)
[ 129.034180] r5:00000000 r4:c105804c
[ 129.037772] [<c0e009b0>] (start_kernel) from [<80008090>] (0x80008090)
[ 129.044325] —[ end trace 818f6e173411fb24 ]—

想请问一下这个原因是什么呢?

另:我们的GPIO用的是VOUT1的一些数据引脚,我在DTB文件里将跟VOUT1有关的功能都删掉后,依然会收到这个错误

luo qi:

单步跟踪发现下边红色部分代码都可以导致出现这个错误

HW_WR_REG32(0x4A00361C,0x000A000E);//GPIO FOR RESET(GPIO8-16) regVal=HW_RD_REG32(0x48053134); regVal&=~0x00010000; HW_WR_REG32(0x48053134,regVal); HW_WR_REG32(0x48053130,0);/**/

Nancy Wang:

回复 luo qi:

试一下以下帖子给出的解决方法是否有帮助。
e2e.ti.com/…/2091268

Shine:

回复 luo qi:

请问上述红色代码单独在DSP内核上运行可以正确控制GPIO管脚吗?

luo qi:

回复 Shine:

感谢回复
红色部分可以运行成功,gpio实际也有动作,只是每次操作都会导致linux端报上边的错误,控制台不停的弹出错误没法交互了
另外我们发现不是所有的gpio bank都有这个问题
我们使用的是am5728的vout1端口改为gpio,换做gpio6就没问题,怀疑是和arm的vout1冲突了
但是我们在dts文件里把所有有关显示的功能都去掉了,仍然会出现这个错误
不知道如何能够最简单的把vout1关闭呢?

luo qi:

回复 Nancy Wang:

这个帖子最后的遇到的问题就是我现在遇到的问题,但是后边没回复了

Shine:

回复 luo qi:

请问dts里Pinmux配置也取消了吗?

luo qi:

回复 Shine:

dts里边没找到直接配置vout1的地方,我把lcd和hdmi相关的全注释掉了,仍然有这个问题

赞(0)
未经允许不得转载:TI中文支持网 » AM5728中DSP控制GPIO的问题
分享到: 更多 (0)