Hi,
I am trying to test the write and read speed of the sata2 interface on OMAP-L138, the harddisk is Segate 320GB 7200.10 16M, the format is FAT32, I wrote a simple program running on the arm side as followed:
#include <sys/types.h> #include <sys/stat.h> #include <unistd.h> #include <fcntl.h> #include <stdio.h> #include <errno.h> extern int errno; #define NUM 1024000 int main() { long int i; int fd; int buf[NUM] ={0}; fd = open("/mnt/posix.data",O_CREAT | O_RDWR | O_EXCL, S_IRWXU); if (-1 == fd) { switch (errno) { case EEXIST: printf("File exist!\n"); break; default: printf("open file fail!\n"); break; } return 0; } write (fd, buf, NUM); for(i=0;i<999;i++) { lseek(fd,0,SEEK_END); write (fd, buf, NUM); } close (fd); } A array of 1MB was written into the harddisk for about 1000 times cycle to make the posix.data file locate in the /mnt directory about 1GB, as I tested, the write speed is about 17MB/s, but when I refer to the TI wiki website http://processors.wiki.ti.com/index.php/DaVinci_PSP_03.20.00.14_Device_Driver_Features_and_Performance_Guide#SATA , I found that the average write speed of the sata2 interface is about 21.6MB/s @300 MHz . Could you help me analyse this problem please? Are there something wrong with my program or the format of the hardisk which leading to this lower write speed happend? How can I make the sata2 interface working on a higher write speed? Beyond this, I am working on the configuration of the DSPLink to make the two cores in the OMAP-L138 to communicate with each other, but I found it difficult to start with, could you please give me some advice to get start with the Dsplink? Thank you very much for your help. Regards, Saul.