Added wait for SPI frame end program