Skip to content

Commit af74c2a

Browse files
SupposedlySamclaude
andcommitted
psram: DQSDM = PIN_NOPULL (revert my PULLDOWN regression) -- matches reference Winbond case
The read-strobe cal never asserted CALCR.DONE in ANY build this session. Root cause found: I had changed DQSDM (PAD_SA12) from PIN_NOPULL to PIN_PULLDOWN on a misreading of the reference -- but the SiFli reference Winbond case (board_psram.c board_pinmux_psram_func1_2_4 case 4, line 96) uses PIN_NOPULL, and my own header comment (line 57) already said 'DQSDM(NOPULL)'. A pulldown on the DQS strobe biases it low so the controller never sees a clean read strobe -> the auto-cal can't find a valid SCK/DQS delay (DONE=0) -> bulk reads return garbage. This explains the cal-never-locks + bulk-corrupt symptoms across -73..-77 (all had the pulldown). Reverted to NOPULL. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 9148e9c commit af74c2a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/fw/soc/sf32lb/sf32lb52x/psram.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ static void prv_restore_pinmux(void) {
6969
HAL_PIN_Set(PAD_SA11, MPI1_DIO7, PIN_PULLDOWN, 1);
7070
HAL_PIN_Set(PAD_SA07, MPI1_CLK, PIN_NOPULL, 1);
7171
HAL_PIN_Set(PAD_SA05, MPI1_CS, PIN_NOPULL, 1);
72-
HAL_PIN_Set(PAD_SA12, MPI1_DQSDM, PIN_PULLDOWN, 1); // ref pulls DQS down; floating DQS defeats the read-strobe cal
72+
HAL_PIN_Set(PAD_SA12, MPI1_DQSDM, PIN_NOPULL, 1); // Winbond case uses NOPULL (board_psram.c func4 :96); a pulldown biases the DQS strobe -> cal can't lock
7373
HAL_PIN_Set_Analog(PAD_SA00, 1); // DM unused on Winbond HYPERBUS
7474
HAL_PIN_Set_Analog(PAD_SA06, 1); // CLKB unused on Winbond HYPERBUS
7575
}

0 commit comments

Comments
 (0)