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

AM437X TIMER4产生PWM

方法1:参考这篇文章 http://www.deyisupport.com/question_answer/dsp_arm/sitara_arm/f/25/p/59806/365348.aspx#365348

在执行步骤2时(devmem2 0x48044038 w 0x1842),出错,如下

/dev/mem opened.[ 3175.118330] Unhandled fault: external abort on non-linefetch (0x1018) at 0xb6f3e038
[ 3175.127296] ------------[ cut here ]------------
[ 3175.131948] WARNING: CPU: 0 PID: 1697 at drivers/bus/omap_l3_noc.c:147 l3_interrupt_handler+0x234/0x35c()
[ 3175.141555] 44000000.ocp:L3 Custom Error: MASTER M2 (64-bit) TARGET L4_PER_0 (Read): Data Access in User mode during Functional access
[ 3175.153688] Modules linked in: btwilink bluetooth ads7846 c_can_platform c_can dwc3_omap can_dev snd_soc_davinci_mcasp 6lowpan_iphc [last unloaded: dmtimer_pwm]
[ 3175.168167] CPU: 0 PID: 1697 Comm: devmem2 Tainted: G O 3.14.43 #6
[ 3175.175243] Backtrace: 
[ 3175.177720] [<c001115c>] (dump_backtrace) from [<c00112f8>] (show_stack+0x18/0x1c)
[ 3175.185318] r6:00000093 r5:00000009 r4:ddf65db0 r3:00000000
[ 3175.191038] [<c00112e0>] (show_stack) from [<c06144f0>] (dump_stack+0x20/0x28)
[ 3175.198298] [<c06144d0>] (dump_stack) from [<c00375f4>] (warn_slowpath_common+0x6c/0x8c)
[ 3175.206424] [<c0037588>] (warn_slowpath_common) from [<c00376b8>] (warn_slowpath_fmt+0x38/0x40)
[ 3175.215155] r8:c06422a0 r7:c07b1df8 r6:c07b1a04 r5:80080003 r4:ddcd9f90
[ 3175.221918] [<c0037684>] (warn_slowpath_fmt) from [<c02823ac>] (l3_interrupt_handler+0x234/0x35c)
[ 3175.230824] r3:ddccd300 r2:c07b1ac4
[ 3175.234433] [<c0282178>] (l3_interrupt_handler) from [<c0063ce0>] (handle_irq_event_percpu+0x54/0x1bc)

Q1:这个怎么解决

方法2:在free-electrons有关于timer的代码 http://lxr.free-electrons.com/source/drivers/pwm/pwm-omap-dmtimer.c?v=4.5

编译通过后,但加载驱动时报错,如下

[ 361.851324] omap-dmtimer-pwm dmtimer-pwm@4: Missing dmtimer platform data
[ 361.858169] omap-dmtimer-pwm: probe of dmtimer-pwm@4 failed with error -22

Q2:这个是设备树的问题吗?

Q3:有没有关于TIMER产生PWM的demo啊

user1810729:

回复 Eggsy Pang:

x谢谢,解决了。 是时钟配置问题

郑州–大胜:

回复 user1810729:

你好,请问 您遇到的“时钟配置问题”问题是怎么解决的?? 我现在调试dmtimer pwm时也遇到了这个问题:       

[ 373.398348] omap-dmtimer-pwm dmtimer-pwm@7: Missing dmtimer platform data[ 373.407761] omap-dmtimer-pwm: probe of dmtimer-pwm@7 failed with error -22

谢谢

Eggsy Pang:

回复 郑州–大胜:

设备树文件有使能time吗?

user1810729:

回复 郑州–大胜:

看看相应时钟使能没?可以用DEVMEM查看

郑州–大胜:

回复 user1810729:

查看了,timer 未使能,但是设备树中该如何配置,我看其默认配置中已经对timer进行了使能

赞(0)
未经允许不得转载:TI中文支持网 » AM437X TIMER4产生PWM
分享到: 更多 (0)