-
Notifications
You must be signed in to change notification settings - Fork 5.2k
SPI0 with DMA transfer occurs **TIMEOUT** error on raspbery pi 4B #4219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
|
Thank you for reply : 2, the driver is my colleague's output, and the device is ST7789V2. 3, application is decode a gif map to RGB565 to /dev/st7789 device node. |
@pelwell update: i2s LCD device dts is :
2, I add printk info in bcm2835-dma.c, initialized 8 DMA channels and 2 DMA4 channels, but the datasheet describe up-to 16 DMA channels。 3,Do you have any suggestion about this circumstances? |
update: |
@jiulongshan
num-cs = <4>;
spidev@0 {
};` I did as you suggested in the code. Code : 00 00 00 00 00 00 |
spi0 dma occur TIMEOUT error
We use the spi0 with DMA transfer pathway on raspberrypi pi 4b, the peripheral device is FTF LCD st7789v.
1,it occurs transfer TIMOUT error when display RGB565 data to the LCD divice which log messages ars at follow.
2,when this error happens, it can not restore by reboot the system.
3,Looks like this error is concern about the SPI0-DMA , and this error is similar with #3570
System
Which model of Raspberry Pi?
--> Pi4B 2G DDR
Which OS and version (
cat /etc/rpi-issue
)?--> Raspberry Pi reference 2020-12-02
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, cce27bd6f44a3b2e83855645986b3e21f771e852, stage4
Which firmware version (
vcgencmd version
)?-->Jan 8 2021 14:31:16
Copyright (c) 2012 Broadcom
version 194a85abd768c7334bbadc3f1911c10a7d18ed14 (clean) (release) (start)
Which kernel version (
uname -a
)?Linux raspberrypi 5.4.79-v7l+ su without password via /proc/pid/mem write #2 SMP Fri Mar 12 13:06:56 CST 2021 armv7l GNU/Linux
Logs
[ 101.276092] st7789v_spi_transfer success
[ 101.276146] st7789v_spi_transfer success
[ 101.276162] lcd cs lcd_a
[ 101.501462] st7789v spi0.0: SPI transfer timed out
[ 101.501515] spi_master spi0: failed to transfer one message from queue
[ 101.501534] st7789v_spi_transfer failed, status=-110
[ 101.731408] st7789v spi0.0: SPI transfer timed out
[ 101.731456] spi_master spi0: failed to transfer one message from queue
[ 101.731475] st7789v_spi_transfer failed, status=-110
[ 101.961396] st7789v spi0.0: SPI transfer timed out
[ 101.961442] spi_master spi0: failed to transfer one message from queue
[ 101.961460] st7789v_spi_transfer failed, status=-110
[ 102.181403] st7789v spi0.0: SPI transfer timed out
[ 102.181452] spi_master spi0: failed to transfer one message from queue
[ 102.181470] st7789v_spi_transfer failed, status=-110
[ 102.181483] write data end
[ 102.207565] write data size = 115201
[ 102.207659] mode = 2, buf data a7 41 3d f7 32 ac
[ 102.207727] st7789v_spi_transfer success
[ 102.207784] st7789v_spi_transfer success
[ 102.207837] st7789v_spi_transfer success
Additional context
Action List for now:
1, put dtparam=spi_dma4 in /boot/config.txt
effection: this can make system back to normal, but it can not hold longer than 15mins for transfer timeout error.
2, annotate the dtparam=i2s=on in /boot/config.txt
3, modify the spi clk struct spi_transfer speed_clk from 42Mhz to 41Mhz
t = {
.tx_buf = buff,
.len = len,
.speed_hz = 41000000, //42000000
};
2 and 3affection: this tests on specified raspberry pi board ok by testing more than 24 hours.
But can not work ok in another raspberry pi 4 board.
Does anyone know something about this, especially for raspberry linux kernel contirbute on spi with DMA module.
The text was updated successfully, but these errors were encountered: