cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to Drive SSD1322 (NHD‑2.7‑12864WDW3) OLED Module via SPI2 on STM32H755 Nucleo

durna
Associate III

ssd1322 interface.png

  

ssd1322 interface2.png

 

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.

 

Screenshot_1.png

1000152775.jpg

  

11 REPLIES 11
durna
Associate III

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?

ssd1322 interface.png

ssd1322 interface2.png

 

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)

 

Screenshot_1.png

1000152775.jpg

  

 

Note: The pins seen as short circuit in the photo are GND pins.

durna
Associate III

I've changed data size from 4 bit to 8 bit but the result is same :(

durna
Associate III

I've changed data size from 4 bit to 8 bit but the result is same :(

Please don't poste duplicate threads.

Unable to Drive SSD1322 (NHD‑2.7‑12864WDW3) OLED M... - STMicroelectronics Community

 

If you feel a post has answered your question, please click "Accept as Solution".
durna
Associate III

Okay, I'll be more careful.

durna
Associate III

Is there anybody who has an idea about it?

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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

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.

 

 

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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..