How to change framesize correctly ?

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

How to change framesize correctly ?

677件の閲覧回数
wolfgangschwab
Contributor I

Hello guys,

 

in order to read data with SPI I have to read with 18 clocks(data sheet ADC). The default framesize is 1 byte. If I read 3 times the problem is a pause between each byte. This probably causes errors.

Here is the code I wrote so far:

 

uint_32 frame = 24;

_io_ioctl(spi, IO_IOCTL_SPI_SET_FRAMESIZE, &frame);

_io_read(spi, &buffer, 1);

 

This doesnt work because the clock only sends one pulse and data can not be read.

If I change it to

_io_read(spi, &buffer, 24);

I get 24 pulses but no data on my MISO.

I'd be thankful for advice

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