2025-09-15 5:22 PM - last edited on 2025-09-16 1:39 AM by Andrew Neil
Hello everyone,
I’m working on a custom board based on the STM32L4R9 with a 2.1" round 480×480 display from Newhaven, which uses the ST7701S controller. My goal is to get it running with MIPI DSI / LTDC and TouchGFX.
So far, I’ve managed to display a solid color by manually filling a framebuffer. However, once I integrated TouchGFX and started rendering shapes, the lines appeared shifted. This makes me think the issue is related to timing parameters (HSYNC, VSYNC, VBP, VFP, HBP, HFP).
The problem is that the display datasheet doesn’t provide typical timing values. I contacted Newhaven’s support, and they shared example code for the same panel but using the SSD1963 controller. Unfortunately, using those values didn’t work. Looking deeper into their example, I noticed that the comments mention one set of values, but the actual register settings differ. When I reached out again, they simply said the comments might be wrong, but the code should work. Not very helpful.
Here is the example that they have provided and as you can clearly see:
command(0xb4); //SET HBP data(0x03); //SET HSYNC Total=1056 data(0xA0); data(0x00); //SET HBP 88 data(0x58); data(0x80); //SET HSYNC Pulse Width=128=127pixels+1 data(0x00); //SET Hsync pulse start position data(0x00); data(0x00); //SET Hsync pulse subpixel start position command(0xb6); //SET VBP data(0x02); //SET Vsync total 525 data(0x0d); data(0x00); //SET VBP=32 data(0x1F); data(0x01); //SET VSYNC Pulse Width= 0=0lines+1 data(0x00); //SET Vsync pulse start position data(0x00);
HSYNC total value in the comment is 1056 but the real value is 0x03A0 which is 928, that made me doubt all the values.
Has anyone here worked with this display before? If so, could you share the correct timing parameters?
I’ll attach both the expected output and the actual result I’m getting.
Thanks in advance!
2025-11-04 6:00 PM
Hi Seyli, how are you? I've read your post and I thinking of developing a product with the same combination as yours (STM32L4R9I + 2.1" NewHaven round display). Were you able to make it work?
Thanks!
2025-11-04 6:18 PM
Hi, yes after a lot of debugging I was able to make it work :D let me know if you need help
2025-11-05 6:33 AM
It’s great to hear that, Seyli, and thank you for getting back to me so quickly. It’s good to know that controlling the LCD with the STM32L4R9 is feasible.
At the moment I don’t have my own hardware designed to drive the display, so as a proof of concept I’m planning to use the STM32L4R9I-DISCO development kit and replace the display board (MB1314C-01) with my own, which would allow me to connect the MIPI‑DSI signals to the NewHaven LCD.
The wiring would be as shown in the attached image (MB1314‑to‑NewHaven‑2‑inches‑display.png). I understand that, since the LCD would be driven through its MIPI‑DSI interface in video mode, the RGB and SPI pins on the LCD would not be used.
Regarding the software, I wanted to ask: given that the display is 480×480, it isn’t possible to use the microcontroller’s internal memory to store the frame buffer, so in your PCB design did you use an external PSRAM?
Also, because the LCD has the internal SS7701 controller, it needs a driver to control it via MIPI‑DSI and the MCU’s LTDC peripheral has to be configured correctly. I’ve been looking at the driver provided by user JMD in the following link (they say it works for a square display with the SS7701):
When you developed your solution, did you use that project as a starting point?
Any suggestions or comments about issues you encountered would be very helpful to me.
Many thanks again.
2025-11-05 7:08 AM
Sounds like a good plan to use MB1314C-01 to start up your project. For the schematics that's pretty much it, you're right, RBG and SPI are not needed. Regarding PSRAM, yes in my custom board I used external PSRAM because I was aiming for the highest performance using double framebuffer for a smoother display. I guess you still can use internal RAM but with single framebuffer or partial framebuffer. My recommendation is to go for external PSRAM to avoid risks. I also used external FLASH for assets. (if your display doesn't include images or too many assets I think it's fine to use the internal FLASH) but you have to take it in consideration. Regarding the driver, there's a lot of them online. I didn't use the same as the one mentioned by JMD but at the end, any driver should work whether it's round or square display, what changes is the LTDC and timing configuration.
Good luck for your project.