cancel
Showing results for 
Search instead for 
Did you mean: 

Failed to read W25Q128 spi flash beyond 2 Mbyte

SimonTapmeyer
Associate II

Hello,

I am use a winbond W25Q128JV chip which is connected to the OCTOSPI interface of my STM32H563. I read/write the flash in direct mode. The transfers are done with DMA. Everything works fine as long as the address is smaller than 0x200000 (2 MByte). As soon as I cross that border the DMA stops with HAL_XSPI_FLAG_TE. Has anyone an idea what I am doing wrong?

This is how I parametrize the transfer:

 

 

(void)memset(&eCmdType, 0x00, sizeof(eCmdType));
eCmdType.Instruction		= 0x0B;	/* Fast read data */
eCmdType.InstructionMode	= HAL_XSPI_INSTRUCTION_1_LINE;
eCmdType.InstructionWidth	= HAL_XSPI_INSTRUCTION_8_BITS;
eCmdType.InstructionDTRMode	= HAL_XSPI_INSTRUCTION_DTR_DISABLE;
eCmdType.AddressMode		= HAL_XSPI_ADDRESS_1_LINE;
eCmdType.AddressWidth		= HAL_XSPI_ADDRESS_24_BITS;
eCmdType.Address		= _iStartAddress;
eCmdType.DataMode		= HAL_XSPI_DATA_1_LINE;
eCmdType.DataDTRMode		= HAL_XSPI_DATA_DTR_DISABLE;
eCmdType.DataLength		= _iSize;
eCmdType.AlternateBytesMode	= HAL_XSPI_ALT_BYTES_NONE;
eCmdType.SIOOMode		= HAL_XSPI_SIOO_INST_EVERY_CMD;
eCmdType.DummyCycles		= 8;

 

 

11 REPLIES 11

I'd also prefer the use of the lower case 'b' for bits, which has been in wide usage for decades

MByte

Mbit

I'd also like to see the options list both bit and byte sizes as it draws attention to the specifics and differences.

 

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
KDJEM.1
ST Employee

Hello,

Thank you for sharing your feedback and requests.

I reported internally.

Internal ticket number: 185679 (This is an internal tracking number and is not accessible or usable by customers).

Thank you for your contribution in STCommunity.

Kaouthar

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.