我使用gpio8 A7作为中断口,设置双边沿中断,代码如下:
[mw_shl_code=c,false] my_ultrasonic_device.ultrasonic_gpio_echo = ULTRASONIC_GPIO_ECHO;
gpio_request(my_ultrasonic_device.ultrasonic_gpio_echo,“ultrasonic echo gpio.”);
gpio_direction_input(my_ultrasonic_device.ultrasonic_gpio_echo);
request_irq(gpio_to_irq(my_ultrasonic_device.ultrasonic_gpio_echo),ultrasonic_irq_handle,IRQF_TRIGGER_RISING|IRQF_TRIGGER_FALLING , “ultrasonic_irq”, &my_ultrasonic_device);
[/mw_shl_code]
当有波形产生时,会产生大量log,然后只能产生一次中断。
[mw_shl_code=shell,false]shell@firefly:/sys/devices/eareye_ultrasonic_device.20 #
shell@firefly:/sys/devices/eareye_ultrasonic_device.20 # echo 1 > Ultrasonic
shell@firefly:/sys/devices/eareye_ultrasonic_device.20 # [ 68.509527] irq event 192: bogus return value c362f
[ 68.509582] [wzy] time:0,800303.
[ 68.509756] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.10.0 #173
[ 68.509919] [] (unwind_backtrace+0x0/0xe0) from [] (show_stack+0x10/0x14)
[ 68.510058] [] (show_stack+0x10/0x14) from [] (__report_bad_irq+0x28/0xb8)
[ 68.510195] [] (__report_bad_irq+0x28/0xb8) from [] (handle_irq_event_percpu+0x25c/0x28c)
[ 68.510325] [] (handle_irq_event_percpu+0x25c/0x28c) from [] (handle_irq_event+0x3c/0x5c)
[ 68.510453] [] (handle_irq_event+0x3c/0x5c) from [] (handle_edge_irq+0x114/0x14c)
[ 68.510580] [] (handle_edge_irq+0x114/0x14c) from [] (generic_handle_irq+0x20/0x30)
[ 68.510705] [] (generic_handle_irq+0x20/0x30) from [] (rockchip_irq_demux+0x130/0x228)
[ 68.510828] [] (rockchip_irq_demux+0x130/0x228) from [] (generic_handle_irq+0x20/0x30)
[ 68.510956] [] (generic_handle_irq+0x20/0x30) from [] (handle_IRQ+0x64/0x8c)
[ 68.511076] [] (handle_IRQ+0x64/0x8c) from [] (gic_handle_irq+0x38/0x5c)
[ 68.511191] [] (gic_handle_irq+0x38/0x5c) from [] (__irq_svc+0x40/0x70)
[ 68.511271] Exception stack(0xc0bedf08 to 0xc0bedf50)
[ 68.511366] df00: c0bedf50 00000044 17fb74b3 00000010 c1ef92e0 00000000
[ 68.511476] df20: 17f65b09 00000010 c0bfefd8 c0bec000 c0bfefe8 00000000 132a9479 c0bedf50
[ 68.511565] df40: c0079850 c05adce8 60030013 ffffffff
[ 68.511692] [] (__irq_svc+0x40/0x70) from [] (cpuidle_enter_state+0x54/0xec)
[ 68.511829] [] (cpuidle_enter_state+0x54/0xec) from [] (cpuidle_idle_call+0x16c/0x27c)
[ 68.511961] [] (cpuidle_idle_call+0x16c/0x27c) from [] (arch_cpu_idle+0x8/0x38)
[ 68.512091] [] (arch_cpu_idle+0x8/0x38) from [] (cpu_idle_loop+0x1b8/0x224)
[ 68.512215] [] (cpu_idle_loop+0x1b8/0x224) from [] (freezing_slow_path+0x0/0x80)
[ 68.512331] [] (freezing_slow_path+0x0/0x80) from [] (0xffffffff)
[ 68.512401] handlers:
[ 68.512483] [] ultrasonic_irq_handle
shell@firefly:/sys/devices/eareye_ultrasonic_device.20 #
[/mw_shl_code]
请问这个问题该如何解决?