你好。
我用 W25Q64 为
STM32F746NEH6 开发了一个定制板。
我为这个闪存芯片制作了一个驱动程序。一切(如读取、写入、擦除、内存映射模式...)工作正常...
但是在制作 stldr 文件后我得到了这个错误:
这是我的引出线:
读取函数是否导致此错误?
但是loader不需要这个功能。
我测试了内存映射模式功能......它工作正常......在其他代码中使用它后,外部闪存作为内部闪存工作:
- uint8_t CSP_QSPI_EnableMemoryMappedMode(void)
- {
- QSPI_CommandTypeDef sCommand = {0};
- QSPI_MemoryMappedTypeDef sMemMappedCfg;
- /* basic configuration */
- sCommand.InstructionMode = QSPI_INSTRUCTION_1_LINE; // * 1 line mode Send instruction * /
- sCommand.AddressSize = QSPI_ADDRESS_24_BITS; // * 24 Bit address * /
- sCommand.AlternateByteMode = QSPI_ALTERNATE_BYTES_NONE; // * No interverter byte * /
- sCommand.DdrMode = QSPI_DDR_MODE_DISABLE; // * W25Q64JV does not support DDR * /
- sCommand.DdrHoldHalfCycle = QSPI_DDR_HHC_ANALOG_DELAY; // * DDR mode, data output delay * /
- sCommand.SIOOMode = QSPI_SIOO_INST_EVERY_CMD; // * Each transmission must send instructions * /
- // * Read data * /
- sCommand.Instruction = QUAD_OUT_FAST_READ_CMD; // * Read status command * /
- sCommand.AddressMode = QSPI_ADDRESS_1_LINE; // * 1 Line address * /
- sCommand.DataMode = QSPI_DATA_4_LINES; // * 1 wire data * /
- sCommand.DummyCycles = 8; // * 8 cycles * /
- //MemoryMapped settings
- sMemMappedCfg.TimeOutActivation = QSPI_TIMEOUT_COUNTER_DISABLE;
- sMemMappedCfg.TimeOutPeriod = 0;
- if (HAL_QSPI_MemoryMapped(&hqspi, &sCommand, &sMemMappedCfg) != HAL_OK) {
- return HAL_ERROR;
- }
- /* basic configuration */
- sCommand.InstructionMode = QSPI_INSTRUCTION_1_LINE; // * 1 line mode Send instruction * /
- sCommand.AddressSize = QSPI_ADDRESS_24_BITS; // * 24 Bit address * /
- sCommand.AlternateByteMode = QSPI_ALTERNATE_BYTES_4_LINES; // * 4 Line interverter byte * /
- sCommand.AlternateBytesSize = QSPI_ALTERNATE_BYTES_8_BITS; // * 1 Byte alternate * /
- sCommand.AlternateBytes = 0xFF; // * should be 0xFx * /
- sCommand.DdrMode = QSPI_DDR_MODE_DISABLE; // * W25Q64JV does not support DDR * /
- sCommand.DdrHoldHalfCycle = QSPI_DDR_HHC_ANALOG_DELAY; // * DDR mode, data output delay * /
- sCommand.SIOOMode = QSPI_SIOO_INST_EVERY_CMD; // * Each transmission must send instructions * /
- // * Read data * /
- sCommand.Instruction = QUAD_INOUT_FAST_READ_CMD; // * Read status command * /
- sCommand.AddressMode = QSPI_ADDRESS_4_LINES; // * 4 Line address address * /
- sCommand.DataMode = QSPI_DATA_4_LINES; // * 1 wire data * /
- sCommand.DummyCycles = 4; // * 4 cycles * /
- //MemoryMapped settings
- sMemMappedCfg.TimeOutActivation = QSPI_TIMEOUT_COUNTER_DISABLE;
- sMemMappedCfg.TimeOutPeriod = 0;
- if (HAL_QSPI_MemoryMapped(&hqspi, &sCommand, &sMemMappedCfg) != HAL_OK) {
- return HAL_ERROR;
- }
- }
所以...有什么问题?
谁能帮助我吗?