Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
wwsmg1
rt-thread
提交
ed881ca6
R
rt-thread
项目概览
wwsmg1
/
rt-thread
与 Fork 源项目一致
Fork自
RT-Thread / rt-thread
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rt-thread
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
ed881ca6
编写于
3月 17, 2021
作者:
J
jeshrz
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix overwrite issue when using SDRAM on STM32F7XX
上级
b12615f3
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
28 addition
and
48 deletion
+28
-48
bsp/stm32/libraries/HAL_Drivers/drv_sdram.c
bsp/stm32/libraries/HAL_Drivers/drv_sdram.c
+6
-6
bsp/stm32/stm32f746-st-disco/board/CubeMX_Config/Src/stm32f7xx_hal_msp.c
...f746-st-disco/board/CubeMX_Config/Src/stm32f7xx_hal_msp.c
+21
-41
bsp/stm32/stm32f746-st-disco/board/Kconfig
bsp/stm32/stm32f746-st-disco/board/Kconfig
+1
-1
未找到文件。
bsp/stm32/libraries/HAL_Drivers/drv_sdram.c
浏览文件 @
ed881ca6
...
...
@@ -212,11 +212,11 @@ int sdram_test(void)
for
(
i
=
0
;
i
<
SDRAM_SIZE
/
data_width
;
i
++
)
{
#if SDRAM_DATA_WIDTH == 8
*
(
__IO
uint8_t
*
)(
SDRAM_BANK_ADDR
+
i
*
data_width
)
=
(
uint8_t
)
0x55
;
*
(
__IO
uint8_t
*
)(
SDRAM_BANK_ADDR
+
i
*
data_width
)
=
(
uint8_t
)
(
i
%
100
)
;
#elif SDRAM_DATA_WIDTH == 16
*
(
__IO
uint16_t
*
)(
SDRAM_BANK_ADDR
+
i
*
data_width
)
=
(
uint16_t
)
0x5555
;
*
(
__IO
uint16_t
*
)(
SDRAM_BANK_ADDR
+
i
*
data_width
)
=
(
uint16_t
)
(
i
%
1000
)
;
#else
*
(
__IO
uint32_t
*
)(
SDRAM_BANK_ADDR
+
i
*
data_width
)
=
(
uint32_t
)
0x55555555
;
*
(
__IO
uint32_t
*
)(
SDRAM_BANK_ADDR
+
i
*
data_width
)
=
(
uint32_t
)
(
i
%
1000
)
;
#endif
}
time_cast
=
rt_tick_get
()
-
start_time
;
...
...
@@ -229,21 +229,21 @@ int sdram_test(void)
{
#if SDRAM_DATA_WIDTH == 8
data
=
*
(
__IO
uint8_t
*
)(
SDRAM_BANK_ADDR
+
i
*
data_width
);
if
(
data
!=
0x55
)
if
(
data
!=
i
%
100
)
{
LOG_E
(
"SDRAM test failed!"
);
break
;
}
#elif SDRAM_DATA_WIDTH == 16
data
=
*
(
__IO
uint16_t
*
)(
SDRAM_BANK_ADDR
+
i
*
data_width
);
if
(
data
!=
0x5555
)
if
(
data
!=
i
%
1000
)
{
LOG_E
(
"SDRAM test failed!"
);
break
;
}
#else
data
=
*
(
__IO
uint32_t
*
)(
SDRAM_BANK_ADDR
+
i
*
data_width
);
if
(
data
!=
0x55555555
)
if
(
data
!=
i
%
1000
)
{
LOG_E
(
"SDRAM test failed!"
);
break
;
...
...
bsp/stm32/stm32f746-st-disco/board/CubeMX_Config/Src/stm32f7xx_hal_msp.c
浏览文件 @
ed881ca6
...
...
@@ -671,7 +671,7 @@ static void HAL_FMC_MspInit(void){
/* USER CODE BEGIN FMC_MspInit 0 */
/* USER CODE END FMC_MspInit 0 */
GPIO_InitTypeDef
GPIO_InitStruct
=
{
0
};
GPIO_InitTypeDef
GPIO_InitStruct
=
{
0
};
if
(
FMC_Initialized
)
{
return
;
}
...
...
@@ -716,53 +716,33 @@ static void HAL_FMC_MspInit(void){
PE15 ------> FMC_D12
PE13 ------> FMC_D10
*/
GPIO_InitStruct
.
Pin
=
GPIO_PIN_15
|
GPIO_PIN_8
|
GPIO_PIN_0
|
GPIO_PIN_5
|
GPIO_PIN_4
;
GPIO_InitStruct
.
Mode
=
GPIO_MODE_AF_PP
;
GPIO_InitStruct
.
Pull
=
GPIO_NOPULL
;
GPIO_InitStruct
.
Speed
=
GPIO_SPEED_FREQ_VERY_HIGH
;
GPIO_InitStruct
.
Mode
=
GPIO_MODE_AF_PP
;
GPIO_InitStruct
.
Pull
=
GPIO_NOPULL
;
GPIO_InitStruct
.
Speed
=
GPIO_SPEED_FREQ_VERY_HIGH
;
GPIO_InitStruct
.
Alternate
=
GPIO_AF12_FMC
;
HAL_GPIO_Init
(
GPIOG
,
&
GPIO_InitStruct
);
GPIO_InitStruct
.
Pin
=
GPIO_PIN_0
|
GPIO_PIN_1
|
GPIO_PIN_15
|
GPIO_PIN_10
|
GPIO_PIN_14
|
GPIO_PIN_9
|
GPIO_PIN_8
;
GPIO_InitStruct
.
Mode
=
GPIO_MODE_AF_PP
;
GPIO_InitStruct
.
Pull
=
GPIO_NOPULL
;
GPIO_InitStruct
.
Speed
=
GPIO_SPEED_FREQ_VERY_HIGH
;
GPIO_InitStruct
.
Alternate
=
GPIO_AF12_FMC
;
GPIO_InitStruct
.
Pin
=
GPIO_PIN_3
;
HAL_GPIO_Init
(
GPIOC
,
&
GPIO_InitStruct
);
GPIO_InitStruct
.
Pin
=
GPIO_PIN_0
|
GPIO_PIN_1
|
GPIO_PIN_8
|
GPIO_PIN_9
|
\
GPIO_PIN_10
|
GPIO_PIN_14
|
GPIO_PIN_15
;
HAL_GPIO_Init
(
GPIOD
,
&
GPIO_InitStruct
);
GPIO_InitStruct
.
Pin
=
GPIO_PIN_0
|
GPIO_PIN_1
|
GPIO_PIN_2
|
GPIO_PIN_3
|
GPIO_PIN_4
|
GPIO_PIN_5
|
GPIO_PIN_12
|
GPIO_PIN_15
|
GPIO_PIN_13
|
GPIO_PIN_14
|
GPIO_PIN_11
;
GPIO_InitStruct
.
Mode
=
GPIO_MODE_AF_PP
;
GPIO_InitStruct
.
Pull
=
GPIO_NOPULL
;
GPIO_InitStruct
.
Speed
=
GPIO_SPEED_FREQ_VERY_HIGH
;
GPIO_InitStruct
.
Alternate
=
GPIO_AF12_FMC
;
HAL_GPIO_Init
(
GPIOF
,
&
GPIO_InitStruct
);
GPIO_InitStruct
.
Pin
=
GPIO_PIN_0
|
GPIO_PIN_1
|
GPIO_PIN_7
|
GPIO_PIN_8
|
GPIO_PIN_9
|
\
GPIO_PIN_10
|
GPIO_PIN_11
|
GPIO_PIN_12
|
GPIO_PIN_13
|
GPIO_PIN_14
|
\
GPIO_PIN_15
;
HAL_GPIO_Init
(
GPIOE
,
&
GPIO_InitStruct
);
GPIO_InitStruct
.
Pin
=
GPIO_PIN_5
|
GPIO_PIN_3
;
GPIO_InitStruct
.
Mode
=
GPIO_MODE_AF_PP
;
GPIO_InitStruct
.
Pull
=
GPIO_NOPULL
;
GPIO_InitStruct
.
Speed
=
GPIO_SPEED_FREQ_VERY_HIGH
;
GPIO_InitStruct
.
Alternate
=
GPIO_AF12_FMC
;
HAL_GPIO_Init
(
GPIOH
,
&
GPIO_InitStruct
);
GPIO_InitStruct
.
Pin
=
GPIO_PIN_0
|
GPIO_PIN_1
|
GPIO_PIN_2
|
GPIO_PIN_3
|
GPIO_PIN_4
|
\
GPIO_PIN_5
|
GPIO_PIN_11
|
GPIO_PIN_12
|
GPIO_PIN_13
|
GPIO_PIN_14
|
\
GPIO_PIN_15
;
HAL_GPIO_Init
(
GPIOF
,
&
GPIO_InitStruct
);
GPIO_InitStruct
.
Pin
=
GPIO_PIN_3
;
GPIO_InitStruct
.
Mode
=
GPIO_MODE_AF_PP
;
GPIO_InitStruct
.
Pull
=
GPIO_NOPULL
;
GPIO_InitStruct
.
Speed
=
GPIO_SPEED_FREQ_VERY_HIGH
;
GPIO_InitStruct
.
Alternate
=
GPIO_AF12_FMC
;
HAL_GPIO_Init
(
GPIOC
,
&
GPIO_InitStruct
);
GPIO_InitStruct
.
Pin
=
GPIO_PIN_0
|
GPIO_PIN_1
|
GPIO_PIN_4
|
GPIO_PIN_5
|
GPIO_PIN_8
|
GPIO_PIN_15
;
HAL_GPIO_Init
(
GPIOG
,
&
GPIO_InitStruct
);
GPIO_InitStruct
.
Pin
=
GPIO_PIN_8
|
GPIO_PIN_9
|
GPIO_PIN_11
|
GPIO_PIN_14
|
GPIO_PIN_7
|
GPIO_PIN_10
|
GPIO_PIN_12
|
GPIO_PIN_15
|
GPIO_PIN_13
;
GPIO_InitStruct
.
Mode
=
GPIO_MODE_AF_PP
;
GPIO_InitStruct
.
Pull
=
GPIO_NOPULL
;
GPIO_InitStruct
.
Speed
=
GPIO_SPEED_FREQ_VERY_HIGH
;
GPIO_InitStruct
.
Alternate
=
GPIO_AF12_FMC
;
HAL_GPIO_Init
(
GPIOE
,
&
GPIO_InitStruct
);
GPIO_InitStruct
.
Pin
=
GPIO_PIN_3
|
GPIO_PIN_5
;
HAL_GPIO_Init
(
GPIOH
,
&
GPIO_InitStruct
);
/* USER CODE BEGIN FMC_MspInit 1 */
...
...
bsp/stm32/stm32f746-st-disco/board/Kconfig
浏览文件 @
ed881ca6
...
...
@@ -103,7 +103,7 @@ menu "On-chip Peripheral Drivers"
default n
config BSP_USING_FMC
bool
bool
"Enable Flash Memory Controller(FMC)"
default n
config BSP_USING_LTDC
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录