pengwang
pengwang
This guy hasn't written anything yet

注册于 4 months ago

回答
2
文章
0
关注者
0

我按照学习笔记改了spi的管脚,下载App后提示spiFlash找不到
Downloading file [D:RT-ThreadStudioworkspacebootloaderAppDebugrtthread.bin]...
Error: Failed to erase sectors.
Unspecified error -1
请问可能是哪里没该对呢
这是初始化设置
static uint8_t MX_QUADSPI_Init(void)
{

hqspi.Instance = QUADSPI;
hqspi.Init.ClockPrescaler = 1;
hqspi.Init.FifoThreshold = 4;
hqspi.Init.SampleShifting = QSPI_SAMPLE_SHIFTING_HALFCYCLE;
hqspi.Init.FlashSize = POSITION_VAL(0X2000000)-1;
hqspi.Init.ChipSelectHighTime = QSPI_CS_HIGH_TIME_5_CYCLE;
hqspi.Init.ClockMode = QSPI_CLOCK_MODE_0;
hqspi.Init.FlashID = QSPI_FLASH_ID_1;
hqspi.Init.DualFlash = QSPI_DUALFLASH_DISABLE;
if (HAL_QSPI_Init(&hqspi) != HAL_OK)
{

return 1;

}
else
{

return 0;

}
}

回到
顶部

发布
问题

投诉
建议