21ic问答首页 - STM32H750 QSPI内存映射模式不能随机访问
STM32H750 QSPI内存映射模式不能随机访问
op072021-06-27
我在使用W25Q128FV这个flash,stm32h750, qspi能读能写,数据OK,但是使用HAL_QSPI_MemoryMapped内存映射后,从地址0x9000000直接读取数据也正常,但是我想随意定一个地址开始读取数据,比如从0x90001000开始读取,就发现全是FF。按理说这个地址也在flash范围以内啊?这是个bug么?
赞0
MPU保护了也没用,应该不是这个问题
评论
2021-06-28
赞0
评论
2021-06-28
赞0
{
QSPI_CommandTypeDef s_command;
QSPI_MemoryMappedTypeDef s_mem_mapped_cfg;
/* Configure the command for the read instruction */
s_command.InstructionMode = QSPI_INSTRUCTION_1_LINE;
s_command.Instruction = Fast_Read_Quad;
s_command.AddressMode = QSPI_ADDRESS_4_LINES;
s_command.AddressSize = QSPI_ADDRESS_24_BITS;
s_command.AlternateByteMode = QSPI_ALTERNATE_BYTES_NONE;
s_command.DataMode = QSPI_DATA_4_LINES;
s_command.DummyCycles = 26;
s_command.DdrMode = QSPI_DDR_MODE_DISABLE;
s_command.DdrHoldHalfCycle = QSPI_DDR_HHC_HALF_CLK_DELAY;
s_command.SIOOMode = QSPI_SIOO_INST_EVERY_CMD;
s_command.Address = 0;
s_command.NbData = 2;
/* Configure the memory mapped mode */
s_mem_mapped_cfg.TimeOutActivation = QSPI_TIMEOUT_COUNTER_DISABLE;
s_mem_mapped_cfg.TimeOutPeriod = 0;
return HAL_QSPI_MemoryMapped(&hqspi, &s_command, &s_mem_mapped_cfg);
}
评论
2021-06-27
您需要登录后才可以回复 登录 | 注册