2011-06-07 12:53:32     spi write errno 5 input/output error

Document created by Aaronwu Employee on Aug 27, 2013
Version 1Show Document
  • View in full screen mode

2011-06-07 12:53:32     spi write errno 5 input/output error

Chris Page (UNITED STATES)

Message: 101054   

 

Hi

 

I have been successful in reading and writing to a spi flash device using the spidev ioctl calls. When I try using the read and write functions i.e write("/dev/spidev0.5", buff, len) i get errno 5 (input/output) error. I am the master, there should be

 

The file descriptor opens ok and as I mentioned the ioctl calls work. Any ideas?

 

Chris

QuoteReplyEditDelete

 

 

2011-06-07 13:01:22     Re: spi write errno 5 input/output error

Mike Frysinger (UNITED STATES)

Message: 101055   

 

ignoring the MTD layer provides SPI flash drivers for most devices already, you need to find out where the EIO is coming from

 

first run it through strace to double check the return values of syscalls

 

then add #define DEBUG to the top of the Blackfin SPI driver in the kernel ... then whenever it posts an EIO, it'll log the reason for you in `dmesg`

QuoteReplyEditDelete

Attachments

    Outcomes