/** ****************************************************************************** * @file QSPI/QSPI_MemoryMapped/Inc/main.h * @author MCD Application Team * @brief Header for main.c module ****************************************************************************** * @attention * * Copyright (c) 2017 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file * in the root directory of this software component. * If no LICENSE file comes with this software, it is provided AS-IS. * ****************************************************************************** *//* ... *//* Define to prevent recursive inclusion -------------------------------------*/#ifndef__MAIN_H#define__MAIN_H/* Includes ------------------------------------------------------------------*/#include"stm32f4xx_hal.h"#include"stm32469i_eval.h"Includes/* Exported types ------------------------------------------------------------*//* Exported constants --------------------------------------------------------*//* Definition for QSPI clock resources */#defineQSPI_CLK_ENABLE()__HAL_RCC_QSPI_CLK_ENABLE()#defineQSPI_CLK_DISABLE()__HAL_RCC_QSPI_CLK_DISABLE()#defineQSPI_CS_GPIO_CLK_ENABLE()__HAL_RCC_GPIOB_CLK_ENABLE()#defineQSPI_CLK_GPIO_CLK_ENABLE()__HAL_RCC_GPIOF_CLK_ENABLE()#defineQSPI_D0_GPIO_CLK_ENABLE()__HAL_RCC_GPIOF_CLK_ENABLE()#defineQSPI_D1_GPIO_CLK_ENABLE()__HAL_RCC_GPIOF_CLK_ENABLE()#defineQSPI_D2_GPIO_CLK_ENABLE()__HAL_RCC_GPIOF_CLK_ENABLE()#defineQSPI_D3_GPIO_CLK_ENABLE()__HAL_RCC_GPIOF_CLK_ENABLE()#defineQSPI_DMA_CLK_ENABLE()__HAL_RCC_DMA2_CLK_ENABLE()#defineQSPI_FORCE_RESET()__HAL_RCC_QSPI_FORCE_RESET()#defineQSPI_RELEASE_RESET()__HAL_RCC_QSPI_RELEASE_RESET()/* Definition for QSPI Pins */#defineQSPI_CS_PINGPIO_PIN_6#defineQSPI_CS_GPIO_PORTGPIOB#defineQSPI_CLK_PINGPIO_PIN_10#defineQSPI_CLK_GPIO_PORTGPIOF#defineQSPI_D0_PINGPIO_PIN_8#defineQSPI_D0_GPIO_PORTGPIOF#defineQSPI_D1_PINGPIO_PIN_9#defineQSPI_D1_GPIO_PORTGPIOF#defineQSPI_D2_PINGPIO_PIN_7#defineQSPI_D2_GPIO_PORTGPIOF#defineQSPI_D3_PINGPIO_PIN_6#defineQSPI_D3_GPIO_PORTGPIOF/* Definition for QSPI DMA */#defineQSPI_DMA_INSTANCEDMA2_Stream7#defineQSPI_DMA_CHANNELDMA_CHANNEL_3#defineQSPI_DMA_IRQDMA2_Stream7_IRQn#defineQSPI_DMA_IRQ_HANDLERDMA2_Stream7_IRQHandler/* N25Q512A13GSF40E Micron memory *//* Size of the flash */#defineQSPI_FLASH_SIZE25#defineQSPI_PAGE_SIZE256/* Reset Operations */#defineRESET_ENABLE_CMD0x66#defineRESET_MEMORY_CMD0x99/* Identification Operations */#defineREAD_ID_CMD0x9E#defineREAD_ID_CMD20x9F#defineMULTIPLE_IO_READ_ID_CMD0xAF#defineREAD_SERIAL_FLASH_DISCO_PARAM_CMD0x5A/* Read Operations */#defineREAD_CMD0x03#defineREAD_4_BYTE_ADDR_CMD0x13#defineFAST_READ_CMD0x0B#defineFAST_READ_DTR_CMD0x0D#defineFAST_READ_4_BYTE_ADDR_CMD0x0C#defineDUAL_OUT_FAST_READ_CMD0x3B#defineDUAL_OUT_FAST_READ_DTR_CMD0x3D#defineDUAL_OUT_FAST_READ_4_BYTE_ADDR_CMD0x3C#defineDUAL_INOUT_FAST_READ_CMD0xBB#defineDUAL_INOUT_FAST_READ_DTR_CMD0xBD#defineDUAL_INOUT_FAST_READ_4_BYTE_ADDR_CMD0xBC#defineQUAD_OUT_FAST_READ_CMD0x6B#defineQUAD_OUT_FAST_READ_DTR_CMD0x6D#defineQUAD_OUT_FAST_READ_4_BYTE_ADDR_CMD0x6C#defineQUAD_INOUT_FAST_READ_CMD0xEB#defineQUAD_INOUT_FAST_READ_DTR_CMD0xED#defineQUAD_INOUT_FAST_READ_4_BYTE_ADDR_CMD0xEC/* Write Operations */#defineWRITE_ENABLE_CMD0x06#defineWRITE_DISABLE_CMD0x04/* Register Operations */#defineREAD_STATUS_REG_CMD0x05#defineWRITE_STATUS_REG_CMD0x01#defineREAD_LOCK_REG_CMD0xE8#defineWRITE_LOCK_REG_CMD0xE5#defineREAD_FLAG_STATUS_REG_CMD0x70#defineCLEAR_FLAG_STATUS_REG_CMD0x50#defineREAD_NONVOL_CFG_REG_CMD0xB5#defineWRITE_NONVOL_CFG_REG_CMD0xB1#defineREAD_VOL_CFG_REG_CMD0x85#defineWRITE_VOL_CFG_REG_CMD0x81#defineREAD_ENHANCED_VOL_CFG_REG_CMD0x65#defineWRITE_ENHANCED_VOL_CFG_REG_CMD0x61#defineREAD_EXT_ADDR_REG_CMD0xC8#defineWRITE_EXT_ADDR_REG_CMD0xC5/* Program Operations */#definePAGE_PROG_CMD0x02#definePAGE_PROG_4_BYTE_ADDR_CMD0x12#defineDUAL_IN_FAST_PROG_CMD0xA2#defineEXT_DUAL_IN_FAST_PROG_CMD0xD2#defineQUAD_IN_FAST_PROG_CMD0x32#defineEXT_QUAD_IN_FAST_PROG_CMD0x12/*0x38*/#defineQUAD_IN_FAST_PROG_4_BYTE_ADDR_CMD0x34/* Erase Operations */#defineSUBSECTOR_ERASE_CMD0x20#defineSUBSECTOR_ERASE_4_BYTE_ADDR_CMD0x21#defineSECTOR_ERASE_CMD0xD8#defineSECTOR_ERASE_4_BYTE_ADDR_CMD0xDC#defineBULK_ERASE_CMD0xC7#definePROG_ERASE_RESUME_CMD0x7A#definePROG_ERASE_SUSPEND_CMD0x75/* One-Time Programmable Operations */#defineREAD_OTP_ARRAY_CMD0x4B#definePROG_OTP_ARRAY_CMD0x42/* 4-byte Address Mode Operations */#defineENTER_4_BYTE_ADDR_MODE_CMD0xB7#defineEXIT_4_BYTE_ADDR_MODE_CMD0xE9/* Quad Operations */#defineENTER_QUAD_CMD0x35#defineEXIT_QUAD_CMD0xF5/* Default dummy clocks cycles */#defineDUMMY_CLOCK_CYCLES_READ8#defineDUMMY_CLOCK_CYCLES_READ_QUAD10#defineDUMMY_CLOCK_CYCLES_READ_DTR6#defineDUMMY_CLOCK_CYCLES_READ_QUAD_DTR8/* End address of the QSPI memory */#defineQSPI_END_ADDR(1<<QSPI_FLASH_SIZE)/* Size of buffers */#defineBUFFERSIZE(COUNTOF(aTxBuffer)-1)/* Exported macro ------------------------------------------------------------*/#defineCOUNTOF(__BUFFER__)(sizeof(__BUFFER__)/sizeof(*(__BUFFER__)))95 defines/* Exported functions ------------------------------------------------------- *//* ... */#endif/* __MAIN_H */
Details
Show: from
Types: Columns:
All items filtered out
All items filtered out
This file uses the notable symbols shown below. Click anywhere in the file to view more details.