Added spi master test and fixed scheduler bug