|
int main(void)
{
/* USER CODE BEGIN 1 */
/* USER CODE END 1 */
/* MCU Configuration--------------------------------------------------------*/
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();
/* USER CODE BEGIN Init */
/* USER CODE END Init */
/* Configure the system clock */
SystemClock_Config();
/* USER CODE BEGIN SysInit */
/* USER CODE END SysInit */
/* Initialize all configured peripherals */
MX_GPIO_Init();
MX_FMC_Init();
MX_USART1_UART_Init();
/* USER CODE BEGIN 2 */
SDRAM_User_Init();
uint8_t testValue __attribute__((at(SDRAM_BANK2_ADDRESS)));
testValue = 0x5a;
if(Sdram_Test_APP() == 0)
{
printf("SDRAM Test successed\r\n");
}
else
{
printf("SDRAM Test failed\r\n");
}
printf("\r\ntestValue is %#x\r\n", testValue);
printf("\r\ntestValue address is %#x\r\n", &testValue);
/* USER CODE END 2 */
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
}
/* USER CODE END 3 */
} |
-
打印的地址和我选择的BANK地址不一致,有友友遇到过这种情况的吗?
|