Bob Selby(deleted)
|
Use of SPI-MASTER to access SPI data flash device ...
|
Bob Selby(deleted)
11/29/2011 7:05 AM
post90336
|
Use of SPI-MASTER to access SPI data flash device ...
I am investigating accessing an SPI serial data flash device from an app within QNX 650.
As an initial test I am simply trying to read the JEDEC id from the device, but I find that while the first read works
OK the second and subsequent read returns 0's.
I know that these devices (N25Q128) requires a transition on the chip select pin to terminate a read and I expected the
SPI-MASTER to do that on my behalf at the end of the call to "spi_cmdread()" ... but it doesn't seem to.
I have "bodged" it by following each call with an identical call to a different (and invalid) device ID (second
parameter to "spi_cmdread()") and I can now read the JEDEC id as many times as I want within that instance of the
program.
However, if I close the "/dev/spi0" device and terminate the program the next time it is run it reads back 0's and the
only way to fix this is to slay and restart spi-master.
I believe I am configuring the device OK with "spi_setcfg()" and "spi_getdevinfo()" returns sensible info.
Has anyone done something similar or can offer some tips?
TIA
Bob
|
|
|