2025-07-30 1:53 AM
Hello,
I want to interface NHD-2.7-12864WDW3 OLED display with STM32H755 Nucleo and show some data in display
-4 wire SPI-. I had connected all OLED pins to STM32 correctly and than tried to flash this code (that I've attached). But i did not get any output, OLED display did not even glow.
I dont know where i am doing wrong, can you help me on this regard?
Pin 1 (VSS) → GND
Pin 2 (VDD) → +3.3 V
Pin 3 (NC / BC_VDD) → no connection
Pin 4 (D/C) → PA9 (GPIO Output)
Pin 5 (VSS) → GND
Pin 6 (VSS) → GND
Pin 7 (SCLK) → PB13 (SPI2_SCK, AF5)
Pin 8 (SDIN) → PB15 (SPI2_MOSI, AF5)
Pin 9 (NC) → no connection
Pin 10 (VSS) → GND
Pin 11 (VSS) → GND
Pin 12 (VSS) → GND
Pin 13 (VSS) → GND
Pin 14 (VSS) → GND
Pin 15 (NC / VCC sense) → no connection
Pin 16 (/RES) → PA10 (GPIO Output, active LOW reset)
Pin 17 (/CS) → PB2 (GPIO Output, active LOW chip‑select)
Pin 18 (/SHDN) → +3.3 V
Pin 19 (BS1) → GND (BS[1:0]=00 → 4‑wire SPI)
Pin 20 (BS1) → GND (BS[1:0]=00 → 4‑wire SPI)
Note: The pins seen as short circuit in the photo are GND pins.
2025-07-30 3:51 AM - last edited on 2025-07-30 3:57 AM by Andrew Neil
Hello,
I want to interface NHD-2.7-12864WDW3 OLED display with STM32H755 Nucleo and show some data in display
-4 wire SPI-. I had connected all OLED pins to STM32 correctly and than tried to flash this code (that I've attached). But i did not get any output, OLED display did not even glow.
I dont know where i am doing wrong, can you help me on this regard?
Pin 1 (VSS) → GND
Pin 2 (VDD) → +3.3 V
Pin 3 (NC / BC_VDD) → no connection
Pin 4 (D/C) → PA9 (GPIO Output)
Pin 5 (VSS) → GND
Pin 6 (VSS) → GND
Pin 7 (SCLK) → PB13 (SPI2_SCK, AF5)
Pin 8 (SDIN) → PB15 (SPI2_MOSI, AF5)
Pin 9 (NC) → no connection
Pin 10 (VSS) → GND
Pin 11 (VSS) → GND
Pin 12 (VSS) → GND
Pin 13 (VSS) → GND
Pin 14 (VSS) → GND
Pin 15 (NC / VCC sense) → no connection
Pin 16 (/RES) → PA10 (GPIO Output, active LOW reset)
Pin 17 (/CS) → PB2 (GPIO Output, active LOW chip‑select)
Pin 18 (/SHDN) → +3.3 V
Pin 19 (BS1) → GND (BS[1:0]=00 → 4‑wire SPI)
Pin 20 (BS1) → GND (BS[1:0]=00 → 4‑wire SPI)
Note: The pins seen as short circuit in the photo are GND pins.
2025-07-30 4:05 AM
I've changed data size from 4 bit to 8 bit but the result is same :(
2025-07-30 4:05 AM
I've changed data size from 4 bit to 8 bit but the result is same :(
2025-07-30 5:02 AM
Please don't poste duplicate threads.
Unable to Drive SSD1322 (NHD‑2.7‑12864WDW3) OLED M... - STMicroelectronics Community
2025-07-30 5:05 AM
Okay, I'll be more careful.
2025-07-30 6:11 AM - last edited on 2025-07-30 10:43 AM by Tesla DeLorean
Is there anybody who has an idea about it?
2025-07-30 12:24 PM - edited 2025-07-30 12:25 PM
I think you need to work with New Haven, and perhaps get a scope or analyzer on the signals.
I'd probably double check that the SPI Transmit completes before pulling the Chip Select High again. Need to make sure the last bit crosses the wire, I think SPI TransmitReceive function achieves that, whereas TXE is more relative to the first bit over the wire. Is there a BUSY or TC bit you can spin on?
>>I've changed data size from 4 bit to 8 bit but the result is same
Ok, what does that actually mean? SPI should be sending 8-bit bytes a bit at a time. You're not using the parallel modes.
I've tended to use I2C for my SSD13xx OLED displays, I don't have any SSD1322 3.12" panels to work with. It would cost time and materials for me to demonstrate a workable solution.
2025-07-30 12:46 PM
Thanks for answer @Tesla DeLorean
But
The SSD1322 controller does not support I²C natively—it only offers 4-wire SPI, 3-wire SPI, or 8-bit parallel interfaces. To use it over I²C you’d need an external I²C-to-SPI bridge (e.g. NXP SC18IS602), which adds hardware complexity and may reduce performance.
2025-07-30 1:15 PM
The 3-wire SPI mode uses 9-bit
I think my primary point was that you need to get the timing and completion of the SPI 4-wire mode correct, so the placement of C/D and -CS with respect to the data going out on the wire.
You could help do this with the SPI TransmitReceive method with a scratch buffer for the "returned" data, but this would at least ensure the function didn't return until AFTER the last transmit bit has crossed the wire. Otherwise you need to pay attention to the Transmit Complete for the last byte being sent.