Skip to content

Commit b7603d3

Browse files
committed
oled: longer reset (needed on BX)
1 parent e4e8714 commit b7603d3

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

verilog/oled.v

+9-5
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ module oled_controller(input wire clk,
123123
reg [7:0] data_rgb_lower_byte;
124124

125125
reg [3:0] state = STATE_RESET;
126+
reg [9:0] reset_counter = 0;
126127

127128
integer i;
128129

@@ -227,11 +228,14 @@ module oled_controller(input wire clk,
227228
pin_res <= 1;
228229
case (state)
229230
STATE_RESET: begin
230-
if (spi_ready) begin
231-
pin_res <= 0;
232-
state <= STATE_INIT;
233-
command_idx <= 0;
234-
end
231+
pin_res <= 0;
232+
reset_counter <= reset_counter + 1;
233+
if (&reset_counter)
234+
if (spi_ready) begin
235+
pin_res <= 0;
236+
state <= STATE_INIT;
237+
command_idx <= 0;
238+
end
235239
end
236240
STATE_INIT: begin
237241
if (spi_ready) begin

0 commit comments

Comments
 (0)