From: Michael McMaster Date: Tue, 2 Mar 2021 12:13:15 +0000 (+1000) Subject: V2021 board is now working X-Git-Tag: v6.4.0~6^2~1 X-Git-Url: http://git.codesrc.com/gitweb.cgi?a=commitdiff_plain;h=148e7dc70758a6cf578a056bf85fc62a68f00b55;p=SCSI2SD-V6.git V2021 board is now working --- diff --git a/STM32CubeMX/2021/Src/fmc.c b/STM32CubeMX/2021/Src/fmc.c index 995fd15d..56e0f7c3 100644 --- a/STM32CubeMX/2021/Src/fmc.c +++ b/STM32CubeMX/2021/Src/fmc.c @@ -54,8 +54,8 @@ void MX_FMC_Init(void) /* Timing */ // 1 clock to read the address, + 1 for synchroniser skew - Timing.AddressSetupTime = 2; - Timing.AddressHoldTime = 1; + Timing.AddressSetupTime = 4; + Timing.AddressHoldTime = 2; // Writes to device: // 1 for synchroniser skew (dbx also delayed) @@ -65,12 +65,12 @@ void MX_FMC_Init(void) // Reads from device: // 3 for syncroniser // 1 to write back to fsmc bus. - Timing.DataSetupTime = 4; + Timing.DataSetupTime = 8; // Allow a clock for us to release signals // Need to avoid both devices acting as outputs // on the multiplexed lines at the same time. - Timing.BusTurnAroundDuration = 1; + Timing.BusTurnAroundDuration = 2; Timing.CLKDivision = 16; // Ignored for async Timing.DataLatency = 17; // Ignored for async diff --git a/src/firmware/scsiPhy.c b/src/firmware/scsiPhy.c index 3eeeaee3..2f925fff 100755 --- a/src/firmware/scsiPhy.c +++ b/src/firmware/scsiPhy.c @@ -155,8 +155,14 @@ scsiSetDataCount(uint32_t count) int scsiFifoReady(void) { __NOP(); +#ifdef STM32F4xx + __NOP(); +#endif HAL_GPIO_ReadPin(GPIOE, FPGA_GPIO3_Pin); __NOP(); +#ifdef STM32F4xx + __NOP(); +#endif return HAL_GPIO_ReadPin(GPIOE, FPGA_GPIO3_Pin) != 0; } @@ -167,6 +173,7 @@ scsiReadByte(void) // Ready immediately. setDataCount resets fifos + __disable_irq(); while (!scsiPhyComplete() && likely(!scsiDev.resetFlag)) { __WFI(); // Wait for interrupt