Go to the documentation of this file.
70 #if defined (HAL_SRAM_MODULE_ENABLED) || defined(HAL_NOR_MODULE_ENABLED) || defined(HAL_NAND_MODULE_ENABLED) || defined(HAL_SDRAM_MODULE_ENABLED)
155 tmpr = Device->BTCR[
Init->NSBank];
166 tmpr |= (uint32_t)(
Init->DataAddressMux |\
168 Init->MemoryDataWidth |\
169 Init->BurstAccessMode |\
170 Init->WaitSignalPolarity |\
171 Init->WaitSignalActive |\
172 Init->WriteOperation |\
174 Init->ExtendedMode |\
175 Init->AsynchronousWait |\
177 Init->ContinuousClock |\
186 Device->BTCR[
Init->NSBank] = tmpr;
223 Device->BTCR[Bank] = 0x000030DB;
228 Device->BTCR[Bank] = 0x000030D2;
231 Device->BTCR[Bank + 1] = 0x0FFFFFFF;
232 ExDevice->BWTR[Bank] = 0x0FFFFFFF;
262 tmpr = Device->BTCR[Bank + 1];
270 tmpr |= (uint32_t)(
Timing->AddressSetupTime |\
271 ((
Timing->AddressHoldTime) << 4) |\
272 ((
Timing->DataSetupTime) << 8) |\
273 ((
Timing->BusTurnAroundDuration) << 16) |\
274 (((
Timing->CLKDivision)-1) << 20) |\
275 (((
Timing->DataLatency)-2) << 24) |\
279 Device->BTCR[Bank + 1] = tmpr;
284 tmpr = (uint32_t)(Device->BTCR[
FMC_NORSRAM_BANK1 + 1] & ~(((uint32_t)0x0F) << 20));
285 tmpr |= (uint32_t)(((
Timing->CLKDivision)-1) << 20);
322 tmpr = Device->BWTR[Bank];
328 tmpr |= (uint32_t)(
Timing->AddressSetupTime |\
329 ((
Timing->AddressHoldTime) << 4) |\
330 ((
Timing->DataSetupTime) << 8) |\
331 ((
Timing->BusTurnAroundDuration) << 16) |\
334 Device->BWTR[Bank] = tmpr;
338 Device->BWTR[Bank] = 0x0FFFFFFF;
477 tmpr |= (uint32_t)(
Init->Waitfeature |\
479 Init->MemoryDataWidth |\
480 Init->EccComputation |\
482 ((
Init->TCLRSetupTime) << 9) |\
483 ((
Init->TARSetupTime) << 13));
519 tmpr |= (uint32_t)(
Timing->SetupTime |\
520 ((
Timing->WaitSetupTime) << 8) |\
521 ((
Timing->HoldSetupTime) << 16) |\
522 ((
Timing->HiZSetupTime) << 24)
558 tmpr |= (uint32_t)(
Timing->SetupTime |\
559 ((
Timing->WaitSetupTime) << 8) |\
560 ((
Timing->HoldSetupTime) << 16) |\
561 ((
Timing->HiZSetupTime) << 24));
585 Device->PCR = 0x00000018U;
586 Device->SR = 0x00000040U;
587 Device->PMEM = 0xFCFCFCFCU;
588 Device->PATT = 0xFCFCFCFCU;
660 uint32_t tickstart = 0;
675 if((Timeout == 0)||((
HAL_GetTick() - tickstart ) > Timeout))
683 *ECCval = (uint32_t)Device->ECCR;
770 tmpr1 |= (uint32_t)(
Init->ColumnBitsNumber |\
771 Init->RowBitsNumber |\
772 Init->MemoryDataWidth |\
773 Init->InternalBankNumber |\
775 Init->WriteProtection |\
776 Init->SDClockPeriod |\
789 tmpr1 |= (uint32_t)(
Init->SDClockPeriod |\
791 Init->ReadPipeDelay);
800 tmpr2 |= (uint32_t)(
Init->ColumnBitsNumber |\
801 Init->RowBitsNumber |\
802 Init->MemoryDataWidth |\
803 Init->InternalBankNumber |\
805 Init->WriteProtection);
900 Device->SDCR[Bank] = 0x000002D0;
901 Device->SDTR[Bank] = 0x0FFFFFFF;
902 Device->SDCMR = 0x00000000;
903 Device->SDRTR = 0x00000000;
904 Device->SDSR = 0x00000000;
973 __IO uint32_t tmpr = 0;
989 Device->SDCMR = tmpr;
1007 Device->SDRTR |= (RefreshRate<<1);
1025 Device->SDCMR |= (AutoRefreshNumber << 5);
1041 uint32_t tmpreg = 0;
FMC SDRAM Configuration Structure definition
#define assert_param(expr)
Include module's header file.
FMC SDRAM Timing parameters structure definition.
napi_value Init(napi_env env, napi_value exports)
#define IS_FMC_MODE_REGISTER(__CONTENT__)
HAL_StatusTypeDef
HAL Status structures definition
#define IS_FMC_SDRAM_DEVICE(__INSTANCE__)
#define FMC_PMEM_MEMHOLD3
static FMC_SDRAM_TimingTypeDef Timing
#define IS_FMC_SDCLOCK_PERIOD(__PERIOD__)
#define FMC_BCR1_CBURSTRW
#define IS_FMC_WRITE_OPERATION(__OPERATION__)
#define IS_FMC_SDMEMORY_WIDTH(WIDTH)
#define IS_FMC_LOADTOACTIVE_DELAY(__DELAY__)
#define FMC_BCR1_ASYNCWAIT
#define __FMC_NAND_DISABLE(__INSTANCE__)
Disable the NAND device access.
#define IS_FMC_NORSRAM_DEVICE(__INSTANCE__)
#define IS_FMC_COMMAND_MODE(__COMMAND__)
uint32_t ExitSelfRefreshDelay
#define IS_FMC_WAIT_POLARITY(__POLARITY__)
#define IS_FMC_COMMAND_TARGET(__TARGET__)
#define IS_FMC_WAIT_TIME(TIME)
uint32_t AutoRefreshNumber
HAL_StatusTypeDef FMC_SDRAM_WriteProtection_Disable(FMC_SDRAM_TypeDef *Device, uint32_t Bank)
#define IS_FMC_ROWBITS_NUMBER(ROW)
HAL_StatusTypeDef FMC_SDRAM_SetAutoRefreshNumber(FMC_SDRAM_TypeDef *Device, uint32_t AutoRefreshNumber)
#define IS_FMC_EXITSELFREFRESH_DELAY(__DELAY__)
#define IS_FMC_ECCPAGE_SIZE(SIZE)
#define IS_FMC_WAIT_SIGNAL_ACTIVE(__ACTIVE__)
#define IS_FMC_WRITE_FIFO(__FIFO__)
#define IS_FMC_DATASETUP_TIME(__TIME__)
uint32_t HAL_GetTick(void)
Provides a tick value in millisecond.
#define IS_FMC_AUTOREFRESH_NUMBER(__NUMBER__)
#define __FMC_NAND_GET_FLAG(__INSTANCE__, __BANK__, __FLAG__)
Get flag status of the NAND device.
#define IS_FMC_INTERNALBANK_NUMBER(NUMBER)
#define FMC_NORSRAM_TypeDef
#define FMC_EXTENDED_MODE_ENABLE
#define IS_FMC_ASYNWAIT(__STATE__)
HAL_StatusTypeDef FMC_NAND_DeInit(FMC_NAND_TypeDef *Device, uint32_t Bank)
uint32_t LoadToActiveDelay
#define FMC_NORSRAM_BANK1
#define FMC_BWTR1_BUSTURN
FMC NORSRAM Timing parameters structure definition
#define IS_FMC_SETUP_TIME(TIME)
#define FMC_PATT_ATTWAIT3
#define IS_FMC_SELFREFRESH_TIME(__TIME__)
#define IS_FMC_BURSTMODE(__STATE__)
#define IS_FMC_WAIT_FEATURE(FEATURE)
#define IS_FMC_MUX(__MUX__)
#define IS_FMC_CLK_DIV(DIV)
#define IS_FMC_READ_BURST(__RBURST__)
#define IS_FMC_NORSRAM_EXTENDED_DEVICE(__INSTANCE__)
#define IS_FMC_ADDRESS_HOLD_TIME(__TIME__)
#define FMC_SDRAM_WRITE_PROTECTION_ENABLE
HAL_StatusTypeDef FMC_SDRAM_Timing_Init(FMC_SDRAM_TypeDef *Device, FMC_SDRAM_TimingTypeDef *Timing, uint32_t Bank)
#define IS_FMC_DATA_LATENCY(__LATENCY__)
#define FMC_MEMORY_TYPE_NOR
#define FMC_PCR_MEMORY_TYPE_NAND
uint32_t FMC_SDRAM_GetModeStatus(FMC_SDRAM_TypeDef *Device, uint32_t Bank)
#define IS_FMC_WRITE_PROTECTION(__WRITE__)
#define FMC_PMEM_MEMWAIT3
#define IS_FMC_READPIPE_DELAY(__DELAY__)
HAL_StatusTypeDef FMC_NORSRAM_DeInit(FMC_NORSRAM_TypeDef *Device, FMC_NORSRAM_EXTENDED_TypeDef *ExDevice, uint32_t Bank)
uint32_t WriteRecoveryTime
#define IS_FMC_NAND_MEMORY_WIDTH(WIDTH)
#define IS_FMC_TAR_TIME(TIME)
#define IS_FMC_RCD_DELAY(__DELAY__)
HAL_StatusTypeDef FMC_NORSRAM_Extended_Timing_Init(FMC_NORSRAM_EXTENDED_TypeDef *Device, FMC_NORSRAM_TimingTypeDef *Timing, uint32_t Bank, uint32_t ExtendedMode)
HAL_StatusTypeDef FMC_NAND_AttributeSpace_Timing_Init(FMC_NAND_TypeDef *Device, FMC_NAND_PCC_TimingTypeDef *Timing, uint32_t Bank)
#define FMC_PATT_ATTHOLD3
#define FMC_SDRAM_TypeDef
#define IS_FMC_ECC_STATE(STATE)
#define IS_FMC_TURNAROUND_TIME(__TIME__)
FMC NAND Timing parameters structure definition.
HAL_StatusTypeDef FMC_NORSRAM_Init(FMC_NORSRAM_TypeDef *Device, FMC_NORSRAM_InitTypeDef *Init)
static FMC_SDRAM_CommandTypeDef Command
#define IS_FMC_CAS_LATENCY(LATENCY)
#define IS_FMC_HIZ_TIME(TIME)
HAL_StatusTypeDef FMC_SDRAM_DeInit(FMC_SDRAM_TypeDef *Device, uint32_t Bank)
#define IS_FMC_ADDRESS_SETUP_TIME(__TIME__)
#define IS_FMC_TCLR_TIME(__TIME__)
#define IS_FMC_ROWCYCLE_DELAY(__DELAY__)
HAL_StatusTypeDef FMC_NAND_ECC_Disable(FMC_NAND_TypeDef *Device, uint32_t Bank)
#define IS_FMC_WAITE_SIGNAL(__SIGNAL__)
#define IS_FMC_WRITE_RECOVERY_TIME(__TIME__)
HAL_StatusTypeDef FMC_SDRAM_Init(FMC_SDRAM_TypeDef *Device, FMC_SDRAM_InitTypeDef *Init)
HAL_StatusTypeDef FMC_NAND_GetECC(FMC_NAND_TypeDef *Device, uint32_t *ECCval, uint32_t Bank, uint32_t Timeout)
HAL_StatusTypeDef FMC_NORSRAM_WriteOperation_Disable(FMC_NORSRAM_TypeDef *Device, uint32_t Bank)
HAL_StatusTypeDef FMC_SDRAM_ProgramRefreshRate(FMC_SDRAM_TypeDef *Device, uint32_t RefreshRate)
HAL_StatusTypeDef FMC_NAND_Init(FMC_NAND_TypeDef *Device, FMC_NAND_InitTypeDef *Init)
#define IS_FMC_COLUMNBITS_NUMBER(COLUMN)
#define IS_FMC_PAGESIZE(__SIZE__)
FMC NORSRAM Configuration Structure definition.
HAL_StatusTypeDef FMC_NORSRAM_Timing_Init(FMC_NORSRAM_TypeDef *Device, FMC_NORSRAM_TimingTypeDef *Timing, uint32_t Bank)
#define FMC_NORSRAM_EXTENDED_TypeDef
SDRAM command parameters structure definition.
#define IS_FMC_NORSRAM_BANK(BANK)
#define IS_FMC_EXTENDED_MODE(__MODE__)
#define HAL_IS_BIT_SET(REG, BIT)
HAL_StatusTypeDef FMC_NAND_ECC_Enable(FMC_NAND_TypeDef *Device, uint32_t Bank)
uint32_t ModeRegisterDefinition
FMC NAND Configuration Structure definition
#define IS_FMC_MEMORY(__MEMORY__)
#define FMC_CONTINUOUS_CLOCK_SYNC_ASYNC
#define IS_FMC_HOLD_TIME(TIME)
HAL_StatusTypeDef FMC_NORSRAM_WriteOperation_Enable(FMC_NORSRAM_TypeDef *Device, uint32_t Bank)
HAL_StatusTypeDef FMC_NAND_CommonSpace_Timing_Init(FMC_NAND_TypeDef *Device, FMC_NAND_PCC_TimingTypeDef *Timing, uint32_t Bank)
#define IS_FMC_NAND_BANK(BANK)
#define IS_FMC_REFRESH_RATE(__RATE__)
#define IS_FMC_NAND_DEVICE(__INSTANCE__)
#define IS_FMC_CONTINOUS_CLOCK(CCLOCK)
#define IS_FMC_SDRAM_BANK(BANK)
HAL_StatusTypeDef FMC_SDRAM_WriteProtection_Enable(FMC_SDRAM_TypeDef *Device, uint32_t Bank)
HAL_StatusTypeDef FMC_SDRAM_SendCommand(FMC_SDRAM_TypeDef *Device, FMC_SDRAM_CommandTypeDef *Command, uint32_t Timeout)
#define IS_FMC_ACCESS_MODE(__MODE__)
#define IS_FMC_RP_DELAY(__DELAY__)
#define IS_FMC_WRITE_BURST(__BURST__)
#define FMC_WRITE_OPERATION_ENABLE
#define IS_FMC_NORSRAM_MEMORY_WIDTH(__WIDTH__)
This file contains all the functions prototypes for the HAL module driver.
#define __FMC_NORSRAM_DISABLE(__INSTANCE__, __BANK__)
Disable the NORSRAM device access.
#define FMC_NORSRAM_FLASH_ACCESS_ENABLE