Difference between revisions of "M.2 to 4x SATA Module"

From Voipac Wiki
Jump to navigation Jump to search
(Replaced content with "Category:iMX8M Industrial Development Kit Category:iMX8M Industrial Peripherals <!-- --> <div style="float:right">__TOC__</div> == SATA == NOTE: Add descriptions...")
Tag: Replaced
Line 5: Line 5:
  
 
== SATA ==
 
== SATA ==
NOTE: Add descriptions / pictures / visual guide how to connect the card to the board. Do not forget to mention requirement of additional power signals are required to be connected from one of the baseboard headers to the card.<br /><br />
 
 
'''''Input:''''' Plug sata disk to M2 extension board and power on<br />
 
'''''Input:''''' Plug sata disk to M2 extension board and power on<br />
 
'''''Output:''''' Sata device is recognized<br />
 
'''''Output:''''' Sata device is recognized<br />
 +
 +
Verify that disk is detected:
 +
<syntaxhighlight lang="bash">
 +
root@imx8mq-voipac:~# dmesg | grep -i 'sata\|ata1\|sda'
 +
[2.715730] ahci 0000:01:00.0: AHCI 0001.0000 32 slots 4 ports 6 Gbps 0xf impl SATA mode
 +
[2.764131] ata1: SATA max UDMA/133 abar m2048@0x20100000 port 0x20100100 irq 239
 +
[2.764139] ata2: SATA max UDMA/133 abar m2048@0x20100000 port 0x20100180 irq 239
 +
[2.764144] ata3: SATA max UDMA/133 abar m2048@0x20100000 port 0x20100200 irq 239
 +
[2.764150] ata4: SATA max UDMA/133 abar m2048@0x20100000 port 0x20100280 irq 239
 +
[3.076332] ata4: SATA link down (SStatus 0 SControl 300)
 +
[3.087794] ata2: SATA link down (SStatus 0 SControl 300)
 +
[3.148725] ata1: SATA link down (SStatus 0 SControl 300)
 +
[3.315573] ata3: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
 +
[3.341751] ata3.00: ATA-9: 8GB SATA Flash Drive, SFDK003A, max UDMA/100
 +
[3.382232] scsi 2:0:0:0: Direct-Access    ATA      8GB SATA Flash D 003A PQ: 0 ANSI: 5
 +
[3.398313] sd 2:0:0:0: [sda] 15649200 512-byte logical blocks: (8.01 GB/7.46 GiB)
 +
[3.407367] sd 2:0:0:0: [sda] Write Protect is off
 +
[3.417888] sd 2:0:0:0: [sda] Mode Sense: 00 3a 00 00
 +
[3.417941] sd 2:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
 +
[3.446160]  sda: sda1
 +
[3.450188] sd 2:0:0:0: [sda] Attached SCSI removable disk
 +
root@imx8mq-voipac:~#
 +
</syntaxhighlight>
  
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">

Revision as of 22:20, 11 February 2025

SATA

Input: Plug sata disk to M2 extension board and power on
Output: Sata device is recognized

Verify that disk is detected:

root@imx8mq-voipac:~# dmesg | grep -i 'sata\|ata1\|sda'
[2.715730] ahci 0000:01:00.0: AHCI 0001.0000 32 slots 4 ports 6 Gbps 0xf impl SATA mode
[2.764131] ata1: SATA max UDMA/133 abar m2048@0x20100000 port 0x20100100 irq 239
[2.764139] ata2: SATA max UDMA/133 abar m2048@0x20100000 port 0x20100180 irq 239
[2.764144] ata3: SATA max UDMA/133 abar m2048@0x20100000 port 0x20100200 irq 239
[2.764150] ata4: SATA max UDMA/133 abar m2048@0x20100000 port 0x20100280 irq 239
[3.076332] ata4: SATA link down (SStatus 0 SControl 300)
[3.087794] ata2: SATA link down (SStatus 0 SControl 300)
[3.148725] ata1: SATA link down (SStatus 0 SControl 300)
[3.315573] ata3: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[3.341751] ata3.00: ATA-9: 8GB SATA Flash Drive, SFDK003A, max UDMA/100
[3.382232] scsi 2:0:0:0: Direct-Access     ATA      8GB SATA Flash D 003A PQ: 0 ANSI: 5
[3.398313] sd 2:0:0:0: [sda] 15649200 512-byte logical blocks: (8.01 GB/7.46 GiB)
[3.407367] sd 2:0:0:0: [sda] Write Protect is off
[3.417888] sd 2:0:0:0: [sda] Mode Sense: 00 3a 00 00
[3.417941] sd 2:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[3.446160]  sda: sda1
[3.450188] sd 2:0:0:0: [sda] Attached SCSI removable disk
root@imx8mq-voipac:~#
root@imx8mq-voipac:~# ls -la /dev/sda
brw-rw---- 1 root disk 8, 0 Feb 22 07:13 /dev/sda
# run speed test - write
root@imx8mq-voipac:~# time dd if=/dev/urandom of=/dev/sda bs=4096 status=progress count=200000
#NOTE: "of=/dev/sdb" is correct? + Consider using a printout from testing a better SATA disk - higher speeds were achieved.
812093440 bytes (812 MB, 774 MiB) copied, 29 s, 28.0 MB/s
200000+0 records in
200000+0 records out
819200000 bytes (819 MB, 781 MiB) copied, 34.1491 s, 24.0 MB/s
real    0m 34.15s
user    0m 0.30s
sys     0m 12.74s

# run speed test - read
root@imx8mq-voipac:~# time dd if=/dev/sda of=/tmp/test.bin bs=4096 status=progress count=100000
#NOTE: "if=/dev/sdb" is correct? + Consider using a printout from testing a better SATA disk - higher speeds were achieved.
364503040 bytes (365 MB, 348 MiB) copied, 4 s, 91.1 MB/s
100000+0 records in
100000+0 records out
409600000 bytes (410 MB, 391 MiB) copied, 4.5828 s, 89.4 MB/s
real    0m 4.79s
user    0m 0.06s
sys     0m 2.15s

We achieved aw write speed ~ 24MB/s and read speed ~90MB/s