QSPI_SRECBootloader/bootloader.c
int SpiFlash4ByteAddressingEnable(XSpi *SpiPtr)
{
	int Status;

	/*
	 * Wait while the Flash is busy.
	 */
//	Status = SpiFlashWaitForFlashReady();
//	if(Status != XST_SUCCESS) {
//		return XST_FAILURE;
//	}

	/*
	 * Prepare the Write Buffer.
	 */
	WriteBuffer[BYTE1] = COMMAND_ENTER_4BYTE_ADDRESS_MODE;



	Status = XSpi_Transfer(SpiPtr, WriteBuffer, NULL,
						0);
	if(Status != XST_SUCCESS) {
		return XST_FAILURE;
	}


	return XST_SUCCESS;
}
/*****************************************************************************/
/**
*
* This function enables the use of 4 bytes addressing of the Winbond Flash.
*
* @param	SpiPtr is a pointer to the instance of the Spi device.
*
* @return	XST_SUCCESS if successful else XST_FAILURE.
*
* @note		The status register content is stored at the second byte pointed
*		by the ReadBuffer.
*
******************************************************************************/
This function enables the use of 4 bytes addressing of the Winbond Flash.
This function enables the use of 4 bytes addressing of the Winbond Flash .
int SpiFlash4ByteAddressingEnable(XSpi *SpiPtr)
{
	int Status;
	WriteBuffer[BYTE1] = COMMAND_ENTER_4BYTE_ADDRESS_MODE;
	Status = XSpi_Transfer(SpiPtr, WriteBuffer, NULL,
						0);
	if(Status != XST_SUCCESS) {
		return XST_FAILURE;
	}
	return XST_SUCCESS;
}
int SpiFlash4ByteAddressingEnable ( XSpi * SpiPtr ) { int Status ; WriteBuffer [ BYTE1 ] = COMMAND_ENTER_4BYTE_ADDRESS_MODE ; Status = XSpi_Transfer ( SpiPtr , WriteBuffer , NULL , 0 ) ; if ( Status != XST_SUCCESS ) { return XST_FAILURE ; } return XST_SUCCESS ; }
This function enables the use of 4 bytes addressing of the Winbond Flash.
This function enables the use of 4 bytes addressing of the Winbond Flash .
/*
	 * Wait while the Flash is busy.
	 */ //	Status = SpiFlashWaitForFlashReady();
 //	if(Status != XST_SUCCESS) {
 //		return XST_FAILURE;
 //	}
 /*
	 * Prepare the Write Buffer.
	 */