Hi:
I added an SPI to UART module under SPI on the LS1028 platform, but I found that the first time I send data, an error occurs. Could you please provide relevant solutions?
BSP information:
Linux:5.10.9
yocto:NXP Real-time Edge Distro 2.0
error log:
Jan 23 06:47:54 ls1028ardb kernel: [ 59.789681] ------------[ cut here ]------------
Jan 23 06:47:54 ls1028ardb kernel: [ 59.789687] irq 126 handler irq_default_primary_handler+0x0/0x14 enabled interrupts
Jan 23 06:47:54 ls1028ardb kernel: [ 59.789707] WARNING: CPU: 0 PID: 29 at kernel/irq/handle.c:159 __handle_irq_event_percpu+0x134/0x170
Jan 23 06:47:54 ls1028ardb kernel: [ 59.789716] Modules linked in:
Jan 23 06:47:54 ls1028ardb kernel: [ 59.789721] CPU: 0 PID: 29 Comm: irq/34-gpio-cas Not tainted 5.10.9-rt24+g3862aa0a0efe #19
Jan 23 06:47:54 ls1028ardb kernel: [ 59.789726] Hardware name: LS1028A RDB Board (DT)
Jan 23 06:47:54 ls1028ardb kernel: [ 59.789728] pstate: 40000005 (nZcv daif -PAN -UAO -TCO BTYPE=--)
Jan 23 06:47:54 ls1028ardb kernel: [ 59.789733] pc : __handle_irq_event_percpu+0x134/0x170
Jan 23 06:47:54 ls1028ardb kernel: [ 59.789738] lr : __handle_irq_event_percpu+0x134/0x170
Jan 23 06:47:54 ls1028ardb kernel: [ 59.789741] sp : ffff800012babc60
Jan 23 06:47:54 ls1028ardb kernel: [ 59.789743] x29: ffff800012babc60 x28: 0000000000000000
Jan 23 06:47:54 ls1028ardb kernel: [ 59.789749] x27: ffff0000003980c8 x26: ffff800011b221f8
Jan 23 06:47:54 ls1028ardb kernel: [ 59.789753] x25: ffff80001274de5a x24: ffff000000e80800
Jan 23 06:47:54 ls1028ardb kernel: [ 59.789757] x23: 000000000000007e x22: ffff800012babce4
Jan 23 06:47:54 ls1028ardb kernel: [ 59.789762] x21: 0000000000000000 x20: 0000000000000002
Jan 23 06:47:54 ls1028ardb kernel: [ 59.789766] x19: ffff000000e60b00 x18: 0000000000000020
Jan 23 06:47:54 ls1028ardb kernel: [ 59.789770] x17: 0000000000000001 x16: 0000000000000001
Jan 23 06:47:54 ls1028ardb kernel: [ 59.789774] x15: ffff0000001ca1e8 x14: ffffffffffffffff
Jan 23 06:47:54 ls1028ardbkernel: [ 59.789778] x13: ffff800092bab7b3 x12: ffff800012bab7bb
Jan 23 06:47:54 ls1028ardb kernel: [ 59.789782] x11: 0101010101010101 x10: ffffff7f7f7fff7f
Jan 23 06:47:54 ls1028ardb kernel: [ 59.789786] x9 : fefe7eff0f5df157 x8 : ffff800012bab6b0
Jan 23 06:47:54 ls1028ardb kernel: [ 59.789790] x7 : 000000000000000f x6 : 00000000fffff25b
Jan 23 06:47:54 ls1028ardb kernel: [ 59.789794] x5 : ffff00006b9d8b20 x4 : 0000000000000000
Jan 23 06:47:54 ls1028ardb kernel: [ 59.789798] x3 : 0000000000000027 x2 : 0000000100000000
Jan 23 06:47:54 ls1028ardb kernel: [ 59.789802] x1 : 28eeff2e41e3e700 x0 : 0000000000000000
Jan 23 06:47:54 ls1028ardb kernel: [ 59.789806] Call trace:
Jan 23 06:47:54 ls1028ardb kernel: [ 59.789808] __handle_irq_event_percpu+0x134/0x170
Jan 23 06:47:54 ls1028ardb kernel: [ 59.789812] handle_irq_event_percpu+0x54/0xb0
Jan 23 06:47:54 ls1028ardb kernel: [ 59.789817] handle_irq_event+0x7c/0x130
Jan 23 06:47:54 ls1028ardb kernel: [ 59.789820] handle_edge_irq+0xa8/0x2b4
Jan 23 06:47:54 ls1028ardb kernel: [ 59.789825] generic_handle_irq+0x30/0x50
Jan 23 06:47:54 ls1028ardb kernel: [ 59.789829] mpc8xxx_gpio_irq_cascade+0xa0/0xf0
Jan 23 06:47:54 ls1028ardb kernel: [ 59.789836] irq_forced_thread_fn+0x3c/0xc0
Jan 23 06:47:54 ls1028ardb kernel: [ 59.789841] irq_thread+0x158/0x280
Jan 23 06:47:54 ls1028ardb kernel: [ 59.789844] kthread+0x18c/0x1a0
Jan 23 06:47:54 ls1028ardb kernel: [ 59.789849] ret_from_fork+0x10/0x30
Jan 23 06:47:54 ls1028ardb kernel: [ 59.789854] ---[ end trace 0000000000000002 ]---
Jan 23 06:47:54 ls1028ardb kernel: [ 60.789981] sched: RT throttling activated
DeviceTree:
&dspi2 {
bus-num = <0>;
status = "okay";
ch9434: ch9434@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "wch,ch943x";
reg = <0>;
spi-max-frequency = <2000000>;
fsl,spi-cs-sck-delay = <1000000>;
fsl,spi-sck-cs-delay = <50>;
interrupt-parent = <&gpio3>;
interrupts = IRQ_TYPE_EDGE_FALLING>;
};
};
Please configure "CONFIG_SERIAL_CH943X" in Linux Kernel configuration file.
Please refer to https://forums.developer.nvidia.com/t/how-to-add-new-ch9434-c-spi-to-uart-on-orin-nx/279543/8
Hi:
Thank you for your response, but this is not just about the interrupts of this particular chip. Anytime I configure a general GPIO interrupt, the same error message appears. This error doesn't occur once the real-time kernel is removed, so this issue might be related to the system's BSP (Board Support Package).