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.
hello
我们现在在用红外串口收发数据,使用的是8250的驱动接口,用中断收发数据,对端是stm32,使用的串口空闲中断来检测am335x是否发送完数据,当检测到2个字符间隔大于一个固定值时,即认为am335x发送完毕!
现在遇到个问题:
am3354使用中断发送的时候,经常会被其他的中断打断,导致数据从xmit->buf搬运到红外串口芯片的FIFO里时产生不小的时延,让stm32误以为am3354发送数据结束了,最后造成数据丢失!
请问如何才能保证am3354的串口中断发送不被异常中断,造成时延增加?
你好!
我们用的是linux kernel5.10
我们推测是中断处理的时候,调用serial8250_handle_irq这个接口的过程中(上下文切换的时候),优先处理了其他的线程或者中断服务,导致serial8250_handle_irq接口调用延时了。
优先处理了其他的线程或者中断服务
具体是什么线程?从log信息能看出来吗?
请尝试使用最新的Processor SDK
https://www.ti.com/tool/download/PROCESSOR-SDK-LINUX-AM335X/09.01.00.001
你好Shine!
我现在用的是kernel5.10的版本,查看了下am33xx.dtsi里面并没有gpio0 module
另外,帖子里面有段话我也没看懂该如何操作:
You need to configure gpio0_7 for GPIOINT0A, and gpio0_19 for GPIOINT0B.
gpio0_7 -> GPIO_IRQSTATUS_SET_0[7] INTLINE = 0x1 -> GPIOINT0A 96
gpio0_19 -> GPIO_IRQSTATUS_SET_1[19] INTLINE = 0x1 -> GPIOINT0B 97
Then you need to configure IRQ number 97 with higher priority than 96.
我不是很清楚gpio0_7 -> GPIO_IRQSTATUS_SET_0[7] INTLINE = 0x1 -> GPIOINT0A 96是什么意思,尤其是0x1->GPIOINT0A 96
另外就是Then you need to configure IRQ number 97 with higher priority than 96. 如何配置?
我在irq-omap-intc.c文件内做了如下修改,但是并不起作用
以下是我们的设备树定义
感谢您对TI产品的关注!由于问题比较复杂,已将您的问题发布在E2E英文技术论坛上,由资深的英文论坛工程师为您提供帮助。 您也可以点击下帖链接了解进展:
https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1317451/am3358-change-uart-interrupt-priority
Linux的设计不保证延迟,我认为如果可能(我没有研究),增加中断优先级不会解决问题。
客户是否尝试过RT Linux?
The serial port is attached to the external serial chip by way of GPMC; the interrupt of uart is triggered by the GPIO_0_26, this IO level changes, they send data to the uart FIFO or read data from the uart FIFO;
请看下面产品线工程师最新的回复。大多数情况下,延时主要来自内核的调度。
In most cases, the latency comes from kernel scheduling to handle the isr, not the interrupt priority in the interrupt controller.
请看数据手册第59页
Table 4-12. Miscellaneous/Miscellaneous Signals Description
nNMI External Interrupt to ARM Cortex-A8 core I C17 B18
https://www.ti.com/lit/ds/symlink/am3358.pdf