--------- Test reading the flash ID SPI flash manufacturer: 0xef, device: 0x3012 Expected for W25X20: 0xef, device: 0x3012 --------- Making sure flash is erased so can test programming it Enabling flash erasing... Starting flash erase (32KB)... SPI flash status (0x03 expected while erasing, 0x00 when finished): 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x00, Finished flash erase... Data fast read starting at address 0x0: 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff (as expected) --------- Testing flash programming Enabling flash programming... Writing data starting at address 0x0: 0xde, 0xad, 0xbe, 0xef, 0xaa, 0xaa, 0x55, 0x55 --------- Testing SPIFlashRead() Data read starting at address 0x0: 0xde, 0xad, 0xbe, 0xef, 0xaa, 0xaa, 0x55, 0x55, 0xff, 0xff, 0xff, 0xff (as expected) --------- Testing SPIFlashFastRead() Data fast read starting at address 0x0: 0xde, 0xad, 0xbe, 0xef, 0xaa, 0xaa, 0x55, 0x55, 0xff, 0xff, 0xff, 0xff (as expected) --------- Testing that programming without erasing clears additional bits Enabling flash programming... Writing data starting at address 0x0: 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff Data fast read starting at address 0x0: 0x00, 0x00, 0xbe, 0xef, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0xff, 0xff (as expected) --------- Testing 32KB erase Enabling flash erasing... Starting flash erase (64KB)... SPI flash status (0x03 expected while erasing, 0x00 when finished): 0x03 ( 50 times), 0x00 ( 1 times), Finished flash erase... Data fast read starting at address 0x0: 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff (as expected) --------- Testing that have to enable programming or it doesn't work Overwriting data w/o enabling prog : 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff Data fast read starting at address 0x0: 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff (as expected) --------- Testing that SPIFlashWriteDisable() prevents programming Enabling flash programming... Disabling flash programming... Overwriting after en/disabling writing: 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 Data fast read starting at address 0x0: 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff (as expected) --------- Testing 64KB erase Enabling flash programming... Writing data starting at address 0x0: 0xde, 0xad, 0xbe, 0xef, 0xaa, 0xaa, 0x55, 0x55 Data fast read starting at address 0x0: 0xde, 0xad, 0xbe, 0xef, 0xaa, 0xaa, 0x55, 0x55, 0xff, 0xff, 0xff, 0xff (as expected) Enabling flash erasing... Starting flash erase (64KB)... SPI flash status (0x03 expected while erasing, 0x00 when finished): 0x03 ( 51 times), 0x00 ( 1 times), Finished flash erase... Data fast read starting at address 0x0: 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff (as expected) --------- Testing chip erase Enabling flash programming... Writing data starting at address 0x0: 0xde, 0xad, 0xbe, 0xef, 0xaa, 0xaa, 0x55, 0x55 Data fast read starting at address 0x0: 0xde, 0xad, 0xbe, 0xef, 0xaa, 0xaa, 0x55, 0x55, 0xff, 0xff, 0xff, 0xff (as expected) Enabling flash erasing... Starting flash erase (whole chip)... SPI flash status (0x03 expected while erasing, 0x00 when finished): 0x03 ( 133 times), 0x00 ( 1 times), Finished flash erase... Data fast read starting at address 0x0: 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff (as expected) --------- Testing 4KB erase Enabling flash programming... Writing data starting at address 0x0: 0xde, 0xad, 0xbe, 0xef, 0xaa, 0xaa, 0x55, 0x55 Data fast read starting at address 0x0: 0xde, 0xad, 0xbe, 0xef, 0xaa, 0xaa, 0x55, 0x55, 0xff, 0xff, 0xff, 0xff (as expected) Enabling flash erasing... Starting flash erase (4KB sector)... SPI flash status (0x03 expected while erasing, 0x00 when finished): 0x03 ( 14 times), 0x00 ( 1 times), Finished flash erase... Data fast read starting at address 0x0: 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff (as expected) ============ Done with Flash Tests ==============