K61 SPI master driver problem, MQX4.0, or is it me?

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

K61 SPI master driver problem, MQX4.0, or is it me?

ソリューションへジャンプ
669件の閲覧回数
cavebiker
Contributor V

Has anyone seen this type of behavior with the new SPI driver from MQX4.0?

-I have a custom board with a K61fn1 and I cannot get the 4.0 SPI driver to work.

-My crude hard-coded SPI driver works on this board fine, meaning hardware is OK (I think).

-Using the MQX/example/SPI project, the SPI driver opens fine 

     spifd = fopen (TEST_CHANNEL, NULL);      --->#define TEST_CHANNEL "spi1:" All good.

-All the ioctl commands to spifd work fine, get and set baud rate, get and set clock mode, etc---

-The problem is when I do -->result = fwrite (buffer, 1, 1, spifd); (from example SPI) the function fails.

Is there anything anyone can think of? any ideas are much appreciated.

Cheers,

Tom

0 件の賞賛
1 解決策
360件の閲覧回数
cavebiker
Contributor V

Never mind, it was me. I must have blown away the set framesize stuff from the example project in a previous play secession. The driver didn't like that. :smileyhappy:

元の投稿で解決策を見る

0 件の賞賛
2 返答(返信)
361件の閲覧回数
cavebiker
Contributor V

Never mind, it was me. I must have blown away the set framesize stuff from the example project in a previous play secession. The driver didn't like that. :smileyhappy:

0 件の賞賛
360件の閲覧回数
cavebiker
Contributor V

Bummer! the MQX SPI driver does not support 32 bits, nothing over 16 bits. When I did 32 bits in bare metal it was not clean, but it is doable.  

0 件の賞賛