STM32 利用CubeIDE (cubemx)配置FSMC 驱动SRAM-----IS62WV51216

基于STM32F103ZET6(正点原子战舰)

SRAM芯片接线图

STM32 利用CubeIDE (cubemx)配置FSMC 驱动SRAM-----IS62WV51216_第1张图片

cube配置图

STM32 利用CubeIDE (cubemx)配置FSMC 驱动SRAM-----IS62WV51216_第2张图片

简单读写测试代码

/* USER CODE BEGIN Includes */
#define Bank1_SRAM3_ADDR    ((uint32_t)(0x68000000))
/* USER CODE END Includes */

/* USER CODE BEGIN 1 */
 	uint32_t temp;
/* USER CODE END 1 */

/* USER CODE BEGIN 2 */
 	 printf("SRAM test begin...\n");
 	 
    *( uint8_t*) (Bank1_SRAM3_ADDR ) = (uint8_t)0xAA;
    printf("Write Data: 0xaa\n");
    
    temp = *( uint8_t*) (Bank1_SRAM3_ADDR );
    printf("Read Data: 0x%x \n",temp);
    
    printf("SRAM test end...\n");
/* USER CODE END 2 */

STM32 利用CubeIDE (cubemx)配置FSMC 驱动SRAM-----IS62WV51216_第3张图片

你可能感兴趣的:(stm32,单片机,嵌入式)