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
Solved! Go to Solution.
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:
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:
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.