- R0cketRacc00n
- Posts: 3
- Joined: Mon Oct 27, 2025 4:08 pm
Display loses image after data transfer when DC pin remains high
I have a display from an Anycubic Kobra Neo 3D printer (presumably ST7789V). I'm trying to get it working on a Raspberry Pi running Raspberry Pi OS (Bookworm).
My config.txt:
text
During boot, when the screen is being updated intensively, I can see an image, but then it disappears. When running kmstest --device=/dev/dri/card0, the image appears momentarily.
Through experimentation with a Python script, I came to the following conclusion:
Before sending a command, the DC pin is set to 0 (command mode) - the image is visible.
During command transmission - the image is visible.
Before sending data, the DC pin is set to 1 (data mode) - the image is only displayed while data is being transmitted.
If after data transmission ends, DC isn't changed and remains high, the screen turns off.
I checked the DC pin state with a multimeter and it remains high when there are no screen updates.
I tried to fix the issue by modifying the kernel module code and adding a pull-down to low level at the end of data transmission (more details here: https://github.com/notro/panel-mipi-dbi/issues/22) and it worked!
But this solution will only work until the next kernel update, after which I'll have to patch and rebuild the kernel again.
I'd like to know how to make DC go low after data transmission?
PS: The fbtft,st7789v driver doesn't give the desired result - with it, the display flickers and shows a negative image.
My config.txt:
text
Code: Select all
dtoverlay=mipi-dbi-spi,speed=8000000
dtparam=compatible=neodisplay0円panel-mipi-dbi-spi
dtparam=write-only
dtparam=width=320,height=240,width-mm=84,height-mm=56
dtparam=reset-gpio=25,dc-gpio=24Through experimentation with a Python script, I came to the following conclusion:
Before sending a command, the DC pin is set to 0 (command mode) - the image is visible.
During command transmission - the image is visible.
Before sending data, the DC pin is set to 1 (data mode) - the image is only displayed while data is being transmitted.
If after data transmission ends, DC isn't changed and remains high, the screen turns off.
I checked the DC pin state with a multimeter and it remains high when there are no screen updates.
I tried to fix the issue by modifying the kernel module code and adding a pull-down to low level at the end of data transmission (more details here: https://github.com/notro/panel-mipi-dbi/issues/22) and it worked!
But this solution will only work until the next kernel update, after which I'll have to patch and rebuild the kernel again.
I'd like to know how to make DC go low after data transmission?
PS: The fbtft,st7789v driver doesn't give the desired result - with it, the display flickers and shows a negative image.
- PhilE
- Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator - Posts: 6874
- Joined: Mon Sep 29, 2014 1:07 pm
Re: Display loses image after data transfer when DC pin remains high
Have you definitely got good 3V3 and GND connections to the display?
- aBUGSworstnightmare
- Posts: 13432
- Joined: Tue Jun 30, 2015 1:35 pm
Re: Display loses image after data transfer when DC pin remains high
where did you get that 'neopixel' binary from?
pretty much expect your problem is because of that. used ST7789V with several displays without any issue.
your SPI speed looks also quite low
Change that to 'speed=48000000'
pretty much expect your problem is because of that. used ST7789V with several displays without any issue.
your SPI speed looks also quite low
Change that to 'speed=48000000'
- R0cketRacc00n
- Posts: 3
- Joined: Mon Oct 27, 2025 4:08 pm
Re: Display loses image after data transfer when DC pin remains high
I created the neodisplay.bin firmware by following the instructions provided here: https://github.com/notro/panel-mipi-dbi/wiki.aBUGSworstnightmare wrote: ↑Mon Oct 27, 2025 6:29 pmwhere did you get that 'neopixel' binary from?
pretty much expect your problem is because of that. used ST7789V with several displays without any issue.
your SPI speed looks also quite low
Change that to 'speed=48000000'
For the initialization commands, I used the source code from this firmware: https://github.com/jokubasver/Kobra_Neo ... 12-L406C12
The contents of my neodisplay.txt file are as follows:
text
Code: Select all
command 0x11 # SLEEP OUT
delay 120
# DISPLAY AND COLOR FORMAT SETTING
command 0x36 0xB0 # MADCTL (MEMORY DATA ACCESS CONTROL)
command 0x3A 0x05 # COLMOD (INTERFACE PIXEL FORMAT)
# ST7789V FRAME RATE SETTING
command 0xB2 0x05 0x05 0x00 0x33 0x33 # PORCTRL (PORCH SETTING)
command 0xB7 0x35 # GCTRL (GATE CONTROL)
# ST7789V POWER SETTING
command 0xBB 0x28 # VCOMS (VCOMS SETTING)
command 0xC0 0x2C # LCMCTRL (LCM CONTROL)
command 0xC2 0x01 0xFF # VDVVRHEN (VDV AND VRH COMMAND ENABLE)
command 0xC3 0x0B # VRHS (VRH SET)
command 0xC4 0x20 # VDVS (VDV SET)
command 0xC6 0x0F # FRCTRL2 (FRAME RATE CONTROL IN NORMAL MODE)
command 0xD0 0xA4 0xA1 # PWCTRL (POWER CONTROL)
# ST7789V GAMMA SETTING
command 0xE0 0xD0 0x01 0x08 0x0F 0x11 0x2A 0x36 0x55 0x44 0x3A 0x0B 0x06 0x11 0x20
command 0xE1 0xD0 0x02 0x07 0x0A 0x0B 0x18 0x34 0x43 0x4A 0x2B 0x1B 0x1C 0x22 0x1F
command 0x29 # DISPLAY ON
delay 120This confirms that the issue is specifically related to the DC pin. If you'd like, I can provide a video to demonstrate this behavior.
- R0cketRacc00n
- Posts: 3
- Joined: Mon Oct 27, 2025 4:08 pm
- aBUGSworstnightmare
- Posts: 13432
- Joined: Tue Jun 30, 2015 1:35 pm
Re: Display loses image after data transfer when DC pin remains high
I'm switching on all my ST7796 based module with below sequenceR0cketRacc00n wrote: ↑Tue Oct 28, 2025 9:47 amMy display is powered by 5V. Yes, it's higher than 3.3V, but the display board has a 5->3.3V converter. So the display gets enough power.
Code: Select all
# Display inversion on
# MIPI_DCS_ENTER_INVERT_MODE
command 0x21
# Sleep out
# MIPI_DCS_EXIT_SLEEP_MODE
command 0x11
delay 100
# Display on
# MIPI_DCS_SET_DISPLAY_ON
command 0x29
delay 100
# MIPI_DCS_ENTER_NORMAL_MODE
command 0x13
delay 20Which display is that exactly? Do you have the data sheet?
Return to "Interfacing (DSI, CSI, I2C, etc.)"
Jump to
- Community
- General discussion
- Announcements
- Other languages
- Deutsch
- Español
- Français
- Italiano
- Nederlands
- 日本語
- Polski
- Português
- Русский
- Türkçe
- User groups and events
- Raspberry Pi Official Magazine
- Using the Raspberry Pi
- Beginners
- Troubleshooting
- Advanced users
- Assistive technology and accessibility
- Education
- Picademy
- Teaching and learning resources
- Staffroom, classroom and projects
- Astro Pi
- Mathematica
- High Altitude Balloon
- Weather station
- Programming
- C/C++
- Java
- Python
- Scratch
- Other programming languages
- Windows 10 for IoT
- Wolfram Language
- Bare metal, Assembly language
- Graphics programming
- OpenGLES
- OpenVG
- OpenMAX
- General programming discussion
- Projects
- Networking and servers
- Automation, sensing and robotics
- Graphics, sound and multimedia
- Other projects
- Media centres
- Gaming
- AIY Projects
- Hardware and peripherals
- Camera board
- Compute Module
- Official Display
- HATs and other add-ons
- Device Tree
- Interfacing (DSI, CSI, I2C, etc.)
- Keyboard computers (400, 500, 500+)
- Raspberry Pi Pico
- General
- SDK
- MicroPython
- Other RP2040 boards
- Zephyr
- Rust
- AI Accelerator
- AI Camera - IMX500
- Hailo
- Software
- Raspberry Pi OS
- Raspberry Pi Connect
- Raspberry Pi Desktop for PC and Mac
- Beta testing
- Other
- Android
- Debian
- FreeBSD
- Gentoo
- Linux Kernel
- NetBSD
- openSUSE
- Plan 9
- Puppy
- Arch
- Pidora / Fedora
- RISCOS
- Ubuntu
- Ye Olde Pi Shoppe
- For sale
- Wanted
- Off topic
- Off topic discussion