Prechádzať zdrojové kódy

SCSI interface working

Getting normal transfer rates for an RP2040 on the SCSI interface.
Added a flag to disable the SWO pin (DISABLE_SWO). Not sure if the
define should be in the platformio.ini file or in the
ZuluSCSI_platform_RP2040 library.
Morio 2 rokov pred
rodič
commit
c3b877ce70

+ 3 - 0
lib/ZuluSCSI_platform_RP2040/ZuluSCSI_platform.cpp

@@ -132,10 +132,13 @@ void platform_init()
     delay(10);
 #endif
 
+#ifndef DISABLE_SWO
     /* Initialize logging to SWO pin (UART0) */
     gpio_conf(SWO_PIN,        GPIO_FUNC_UART,false,false, true,  false, true);
     uart_init(uart0, 1000000);
     g_uart_initialized = true;
+#endif
+
     mbed_set_error_hook(mbed_error_hook);
 
     logmsg("Platform: ", g_platform_name);

+ 1 - 1
lib/ZuluSCSI_platform_RP2040/ZuluSCSI_platform_gpio_Pico.h

@@ -70,7 +70,7 @@
 #define SCSI_IN_REQ   17
 
 // Status LED pins
-#define LED_PIN      15
+#define LED_PIN      16
 #define LED_ON()     sio_hw->gpio_set = 1 << LED_PIN
 #define LED_OFF()    sio_hw->gpio_clr = 1 << LED_PIN
 

+ 2 - 2
lib/ZuluSCSI_platform_RP2040/scsi_accel_Pico.pio

@@ -25,8 +25,8 @@
 ; -   8: DBP
 ; Side set is REQ pin
 
-.define REQ 9
-.define ACK 10
+.define REQ 17
+.define ACK 26
 
 ; Delay from data setup to REQ assertion.
 ; deskew delay + cable skew delay = 55 ns minimum

+ 6 - 6
lib/ZuluSCSI_platform_RP2040/scsi_accel_Pico.pio.h

@@ -50,8 +50,8 @@ static const uint16_t scsi_accel_async_write_program_instructions[] = {
     0x90e0, //  0: pull   ifempty block   side 1     
     0x7009, //  1: out    pins, 9         side 1     
     0x7577, //  2: out    null, 23        side 1 [5] 
-    0x308a, //  3: wait   1 gpio, 10      side 1     
-    0x200a, //  4: wait   0 gpio, 10      side 0     
+    0x309a, //  3: wait   1 gpio, 26      side 1     
+    0x201a, //  4: wait   0 gpio, 26      side 0     
             //     .wrap
 };
 
@@ -80,9 +80,9 @@ static inline pio_sm_config scsi_accel_async_write_program_get_default_config(ui
 static const uint16_t scsi_accel_read_program_instructions[] = {
             //     .wrap_target
     0x90a0, //  0: pull   block           side 1     
-    0x308a, //  1: wait   1 gpio, 10      side 1     
+    0x309a, //  1: wait   1 gpio, 26      side 1     
     0x4061, //  2: in     null, 1         side 0     
-    0x200a, //  3: wait   0 gpio, 10      side 0     
+    0x201a, //  3: wait   0 gpio, 26      side 0     
     0x5009, //  4: in     pins, 9         side 1     
     0x5056, //  5: in     y, 22           side 1     
             //     .wrap
@@ -142,8 +142,8 @@ static inline pio_sm_config scsi_sync_write_program_get_default_config(uint offs
 
 static const uint16_t scsi_sync_write_pacer_program_instructions[] = {
             //     .wrap_target
-    0x208a, //  0: wait   1 gpio, 10                 
-    0x200a, //  1: wait   0 gpio, 10                 
+    0x209a, //  0: wait   1 gpio, 26                 
+    0x201a, //  1: wait   0 gpio, 26                 
     0x6061, //  2: out    null, 1                    
             //     .wrap
 };

+ 1 - 1
platformio.ini

@@ -121,8 +121,8 @@ build_flags =
     -DENABLE_DEDICATED_SPI=1
     -DHAS_SDIO_CLASS
     -DUSE_ARDUINO=1
-    -DZULUSCSI_V2_0
     -DZULUSCSI_PICO
+    -DDISABLE_SWO
 
 
 ; Variant of RP2040 platform, based on Raspberry Pico board and a carrier PCB