i.MX287 and L2.6.35_10.12.01 qca7000

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

i.MX287 and L2.6.35_10.12.01 qca7000

2,184件の閲覧回数
silviagonzalez
Contributor II

I have a i.mx287 with the L2.6.35_10.12.01, and the package of Qualcomm 7000 for spi and uart, and I lost my spi device,

root@pl16 ~$ find / -name "*spi*"

/proc/irq/98/mxs-spi.0

/proc/irq/84/mxs-spi.0

/root/qcaspi.ko

/sys/devices/platform/mxs-spi.0

/sys/devices/platform/mxs-spi.0/spi_master

/sys/devices/platform/mxs-spi.0/spi_master/spi1

/sys/devices/platform/mxs-spi.0/spi1.0

/sys/bus/platform/devices/mxs-spi.0

/sys/bus/platform/drivers/mxs-spi

/sys/bus/platform/drivers/mxs-spi/mxs-spi.0

/sys/bus/spi

/sys/bus/spi/devices/spi1.0

/sys/class/spi_master

/sys/class/spi_master/spi1

/sys/module/spi_mxs

/sys/module/qcaspi

root@pl16 ~$

In the sysconfig-mx.spec. I have

SLATTACH="slattach -s 115200 -p qca /dev/ttySP0"

So I have assumed the spi devices is /dev/ttySP0. And I try to do, the next command, but it doesn't work.

fd=open("/dev/ttySP0",O_RDWR);

unit16_t buf=0xDA00;

int res=write(fd, buf,2);

read(fd,buf,2);

if res==-1

     printk("ERROR")

ラベル(2)
タグ(2)
0 件の賞賛
返信
4 返答(返信)

1,320件の閲覧回数
lategoodbye
Senior Contributor I

Hi Silvia,

the SPI is half duplex, so you need to write 4 bytes (2 bytes for your command and the other 2 bytes for the response). The same applies for reading. Another problem could be the endianess of your SPI command.

Stefan

0 件の賞賛
返信

1,320件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi Silvia

had you already checked below

IoE/qca7000 · GitHub

Best regards

igor

0 件の賞賛
返信

1,320件の閲覧回数
silviagonzalez
Contributor II

Hello

Thanks, but I've already done, I have loaded drivers. But I want to make a little program to read and send package by spi, and I don't know how to start.

0 件の賞賛
返信

1,320件の閲覧回数
igorpadykov
NXP Employee
NXP Employee
0 件の賞賛
返信