Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 14 additions & 7 deletions examples/f469disco-lcd-test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
//! This example supports both STM32F469I-DISCO board revisions:
//! - B08 revision (NT35510 LCD controller) - auto-detected and preferred
//! - B07 and earlier (OTM8009A LCD controller) - fallback
//! (see STM32F469I-DISCO user manual UM1932 for revision split)
//!
//! ## Display Controller Detection
//!
Expand Down Expand Up @@ -101,16 +102,18 @@ impl LcdController {
pub const WIDTH: usize = 480;
pub const HEIGHT: usize = 800;

// NT35510 timing (B08 revision)
// NT35510 timing (B08 / Rev C):
// - Vertical values follow ST's BSP + specter-diy validated hardware settings
// for NT35510 panels (VSYNC=120, VBP=150, VFP=150).
pub const NT35510_DISPLAY_CONFIG: DisplayConfig = DisplayConfig {
active_width: WIDTH as _,
active_height: HEIGHT as _,
h_back_porch: 34,
h_front_porch: 34,
v_back_porch: 15,
v_front_porch: 16,
v_back_porch: 150,
v_front_porch: 150,
h_sync: 2,
v_sync: 1,
v_sync: 120,
frame_rate: 60,
h_sync_pol: true,
v_sync_pol: true,
Expand Down Expand Up @@ -142,8 +145,10 @@ pub const OTM8009A_DISPLAY_CONFIG: DisplayConfig = DisplayConfig {
// work with both display types for reading the RDID1 register.
const DSI_PROBE_DISPLAY_CONFIG: DisplayConfig = NT35510_DISPLAY_CONFIG;

// DSI LP sizes: NT35510 requires larger LP packets (64).
// These values also work with OTM8009A during probe and operation.
// DSI LP sizes:
// - NT35510 needs larger LP packet sizes (64)
// - OTM8009A may prefer 4 in single-controller builds; 64 is used here so one
// runtime-detecting binary can operate on B08+ and B07 boards.
const DSI_LP_SIZE: u8 = 64;
const DSI_VLP_SIZE: u8 = 64;

Expand All @@ -160,7 +165,9 @@ fn main() -> ! {

let gpioh = dp.GPIOH.split(&mut rcc);

// Reset display
// Reset display (PH7/XRES) in push-pull mode.
// This is required by NT35510-based B08 boards and remains compatible with
// OTM8009A boards in our testing.
let mut lcd_reset = gpioh.ph7.into_push_pull_output();
lcd_reset.set_low();
delay.delay_ms(20u32);
Expand Down
6 changes: 5 additions & 1 deletion examples/f469disco/nt35510.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,17 @@ impl Nt35510 {
self.write_reg(dsi_host, 0xCC, &[0x03, 0x00, 0x00])?;
self.write_reg(dsi_host, 0xBA, &[0x01])?;

// Datasheet-derived sequencing:
// - allow internal power stabilization before pixel format setup
// - >=120ms after SLPOUT (0x11)
// - >=20ms after DISPON (0x29)
delay.delay_us(200_000);
self.write_cmd(dsi_host, CMD_COLMOD, COLMOD_RGB888)?;
delay.delay_us(10_000);
self.write_cmd(dsi_host, CMD_SLPOUT, 0x00)?;
delay.delay_us(120_000);
self.write_cmd(dsi_host, CMD_DISPON, 0x00)?;
delay.delay_us(10_000);
delay.delay_us(20_000);

self.initialized = true;
Ok(())
Expand Down
Loading