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

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

Jump to solution
666 Views
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 Kudos
1 Solution
357 Views
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:

View solution in original post

0 Kudos
2 Replies
358 Views
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 Kudos
357 Views
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 Kudos