Hi guys!
I am trying to interface with SPI flash,I am trying to write byte to buffer 1 and after read it,
The byte i have send and recived are not the same. Cant figure out my fault.
/*
* main.c
*/
#include "msp430.h"
#include "stdint.h"
#define SPIRXBUF UCB0RXBUF
#define SPI_SEND(x) UCB0TXBUF=x
#define SPITXREADY (IFG2&UCB0TXIFG) /* Wait for TX to be ready */
#define SPITXDONE (UCB0STAT&UCBUSY) /* Wait for TX to finish */
#define SPIRXREADY (IFG2&UCB0RXIFG) /* Wait for TX to be ready */
#define SPIRXFG_CLR IFG2 &= ~UCB0RXIFG
#define dummy 0xff
#define