Hi,
I'm trying to use the SPI interface on a Laser Bee MCU to write/read data from an FRAM. I started with the SPI_Lib_Master example to learn how to use the SPI. Right now I'm trying to generate the bit sequences that I need in order to operate the memory. Using the SPI_Byte_Write function in the sample code (the function just places data into an array and sends it using SPI0_Transfer function in spi.c). I find that I need to send a dummy byte before transmitting data or my byte sequences is not correct. Right now, I have SPI_Byte_Write sending a single byte. If I want to send: 1001 1111 for example, I need to call SPI_Byte_Write twice, first to send 0000 0000 and then 1001 1111. If I do not send the dummy byte first the output on the MOSI line is 1000 0000. I can't figure out why this might be. Does it have to do with a way that the SPI is configured? Is there a way around this so that I can only send a single byte? Thanks!