How to change framesize correctly ?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

How to change framesize correctly ?

646 次查看
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 回复数