Skip to content

Commit

Permalink
[PSX] Fix original PSX TXD timing
Browse files Browse the repository at this point in the history
For some reason the standard SPI Mode 3 timing for ESP32 didn't work
with the original PSX models.

Tested to work on SCPH-5501, SCPH-101, SCPH-30001 & SCPH-90001.
  • Loading branch information
darthcloud committed Jan 12, 2021
1 parent eab4962 commit 5c133b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main/wired/ps_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -669,9 +669,9 @@ void ps_spi_init(void) {
spi_hw->ctrl.wr_bit_order = 1;
spi_hw->ctrl.rd_bit_order = 1;

/* Set be Mode 3, unlike sniffer! */
/* Set Mode 3 as per ESP32 TRM, except ck_i_edge that need to be 1 for original PSX! */
spi_hw->pin.ck_idle_edge = 0;
spi_hw->user.ck_i_edge = 0;
spi_hw->user.ck_i_edge = 1;
spi_hw->ctrl2.miso_delay_mode = 1;
spi_hw->ctrl2.miso_delay_num = 0;
spi_hw->ctrl2.mosi_delay_mode = 0;
Expand Down

0 comments on commit 5c133b4

Please sign in to comment.