Skip to content

Commit d790a84

Browse files
authored
Merge pull request #92 from BlueSCSI/initiatorStability
Allow signals to settle on REQ pulse
2 parents a2004fd + 9b9d67c commit d790a84

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

lib/BlueSCSI_platform_RP2040/scsi_accel_host.pio

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
start:
2222
wait 0 gpio REQ side 1 ; Wait for REQ low
23+
nop [1] side 1 ; Wait for signals to settle
2324
in pins, 9 side 0 ; Assert ACK, read GPIO
2425
in null, 7 side 0 ; Padding bits
2526
wait 1 gpio REQ side 0 ; Wait for REQ high

lib/BlueSCSI_platform_RP2040/scsi_accel_host.pio.h

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,25 @@
1313
// -------------------- //
1414

1515
#define scsi_host_async_read_wrap_target 0
16-
#define scsi_host_async_read_wrap 6
16+
#define scsi_host_async_read_wrap 7
1717

1818
static const uint16_t scsi_host_async_read_program_instructions[] = {
1919
// .wrap_target
2020
0x90a0, // 0: pull block side 1
2121
0xb027, // 1: mov x, osr side 1
2222
0x3013, // 2: wait 0 gpio, 19 side 1
23-
0x4009, // 3: in pins, 9 side 0
24-
0x4067, // 4: in null, 7 side 0
25-
0x2093, // 5: wait 1 gpio, 19 side 0
26-
0x1042, // 6: jmp x--, 2 side 1
23+
0xb142, // 3: nop side 1 [1]
24+
0x4009, // 4: in pins, 9 side 0
25+
0x4067, // 5: in null, 7 side 0
26+
0x2093, // 6: wait 1 gpio, 19 side 0
27+
0x1042, // 7: jmp x--, 2 side 1
2728
// .wrap
2829
};
2930

3031
#if !PICO_NO_HARDWARE
3132
static const struct pio_program scsi_host_async_read_program = {
3233
.instructions = scsi_host_async_read_program_instructions,
33-
.length = 7,
34+
.length = 8,
3435
.origin = -1,
3536
};
3637

0 commit comments

Comments
 (0)