add SPI master code with M4