Part Number:AM5728
开发包版本:ti-processor-sdk-linux-rt-am57xx-evm-04.03.00.05,做IPC开发,当DSP控制GPIO时,只要操作gpio2的控制寄存器,DSP的代只是调用了GPIOModuleEnable(SOC_GPIO2_BASE),ARM端控制台就会报出一串错误如下:
root@am57xx-evm:~# devmem2 0x4a0034c0
/dev/mem opened.
Memory mapped at address 0xb6f7c000.
Read at address 0x4A0034C0 (0xb6f7c4c0): 0x0004000E
root@am57xx-evm:~# ./load-firmware.sh[ 227.924506] remoteproc remoteproc2: stopped remote processor 40800000.dsp
[ 227.932660] remoteproc remoteproc2: releasing 40800000.dsp
[ 227.938779] omap-rproc 40800000.dsp: assigned reserved memory node dsp1_cma@99000000
[ 227.949677] remoteproc remoteproc2: 40800000.dsp is available
[ 227.963557] prueth pruss2_eth: pruss MC Mask 0:0:0:0:0:0
[ 227.968099] remoteproc remoteproc2: powering up 40800000.dsp
[ 227.968114] remoteproc remoteproc2: Booting fw image dra7-dsp1-fw.xe66, size 8135032
[ 227.982627] prueth pruss2_eth: port 1: using random MAC addr: 92:47:6c:4f:9f:d6
root@am57xx-evm:~# [ 227.985532] omap-iommu 40d01000.mmu: 40d01000.mmu: version 3.0
[ 227.985575] omap-iommu 40d02000.mmu: 40d02000.mmu: version 3.0
[ 228.012533] virtio_rpmsg_bus virtio3: rpmsg host is online
[ 228.012563] remoteproc remoteproc2: registered virtio3 (type 7)
[ 228.012569] remoteproc remoteproc2: remote processor 40800000.dsp is now up
[ 228.015165] ————[ cut here ]————
[ 228.015189] WARNING: CPU: 1 PID: 27 at drivers/bus/omap_l3_noc.c:147 l3_interrupt_handler+0x25c/0x36c
[ 228.015197] 44000000.ocp:L3 Custom Error: MASTER DSP1_MDMA TARGET L4_PER1_P3 (Read): Data Access in User mode during Functional access
[ 228.015309] Modules linked in: bc_example(O) rpmsg_proto sha512_generic sha512_arm sha256_generic sha1_generic sha1_arm_neon sha1_arm md5 des_generic cbc rpmsg_rpc xfrm_user xfrm4_tunnel ipcomp xfrm_ipcomp esp4 ah4 af_key xfrm_algo bluetooth ti_prueth pru_rproc ahci_platform libahci_platform libahci snd_soc_simple_card snd_soc_simple_card_utils pruss pruss_intc snd_soc_omap_hdmi_audio libata c_can_platform c_can pruss_soc_bus omap_wdt can_dev pvrsrvkm(O) ti_vpe ti_sc ti_csc ti_vpdma extcon_palmas ti_cpsw rtc_palmas m25p80 cpsw_common rtc_omap snd_soc_tlv320aic3x omap_remoteproc virtio_rpmsg_b
目前测试任何一个gpio2使用都会出现该问题,linux端设备树上确认没有对引脚做其它功能配置使用。
想咨询下是什么原因会导致出现该问题?
Gary Lu:
可能是DSP中对GPIO的控制代码存在错误或者是DSP和Linux系统之间的GPIO资源冲突
,
user5792223:
目前发现,dsp对GPIO2的操作,每次都要去配置CLKCTRL,CM_L4PER_CLKSTCTRL_REG和CM_L4PER_GPIO2_CLKCTRL_REG都要配置。请问一下,有什么办法让主CPU不让GPIO2进入IDLE吗?
,
Gary Lu:
检查一下主CPU在初始化运行时正确配置了GPIO2相关的时钟和电源管理寄存器,以防止它进入IDLE状态
检查`CM_L4PER_CLKSTCTRL_REG`和`CM_L4PER_GPIO2_CLKCTRL_REG`的配置,确保这些寄存器中的设置不会导致GPIO2的时钟关闭。
再检查一下设备树中对GPIO2的配置不包含任何可能导致其进入IDLE状态的设置(注意与时钟和电源管理相关的节点)