AnsweredAssumed Answered

Memmory instructions for SPI

Question asked by Yadhukrishnan V M on Sep 8, 2016
Latest reply on Sep 19, 2016 by soledad

Hi,

 I am writing code for memmory read and write using spi in TWR-K65F180. I am writing code by referring the code for spi in mqx examples folder. In that example I found these defnitons, SPI serial memmory instructions. But I didn't understand the hexadecimal numbers used for defining like 0x01,0x02... please anybody explain what are this numbers or what is the use of these numbers in my code.

 

/* The SPI serial memory instructions */
#define SPI_MEMORY_WRITE_STATUS 0x01
#define SPI_MEMORY_WRITE_DATA 0x02
#define SPI_MEMORY_READ_DATA 0x03
#define SPI_MEMORY_WRITE_LATCH_DISABLE 0x04
#define SPI_MEMORY_READ_STATUS 0x05
#define SPI_MEMORY_WRITE_LATCH_ENABLE 0x06
#define SPI_MEMORY_CHIP_ERASE 0xC7

Outcomes