[ion] ExternalFlash: reset QUADSPI peripheral

This commit is contained in:
Émilie Feral
2019-04-04 10:10:22 +02:00
parent eecfac290c
commit b1c3c2813e

View File

@@ -263,7 +263,10 @@ static void initGPIO() {
static void initQSPI() {
// Enable QUADSPI AHB3 peripheral clock
RCC.AHB3ENR()->setQSPIEN(true);
// Configure controller for target device
/* Reset QSPI peripheral */
RCC.AHB3RSTR()->setQSPIRST(true);
RCC.AHB3RSTR()->setQSPIRST(false);
// Configure controller for target device
class QUADSPI::DCR dcr(0);
dcr.setFSIZE(NumberOfAddressBitsInChip - 1);
/* According to the device's datasheet (see Sections 8.7 and 8.8), the CS