Hello,
I have the following issue when using a spidev with a M25P32 spi flash. Looking at the scope everything seems to work just fine. I get a clock, CS is issued correctly, DQ0 changes, DQ1 outputs data.
However, when I look at my program:
int fd;
fd = open("/dev/spidev1.0", O_RDWR);
if( fd <= 0 )
{
printf("erroor\n");
exit(1);
}
char cmd[4] = { 0x9F,0x00,0x00,0x00 };
char buf[16];
write(fd, cmd,4);
read(fd,buf,16);
close(fd);
printf("Read: %s\n",buf);
says otherwise. De buffer content is always FF....... I don't understand. This spi flash works, since I use it to boot my board's bootloader. Linux itself is loaded from nand flash. I hope someone can help me...
Kind regards