summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorToshifumi NISHINAGA <tnishinaga.dev@gmail.com>2016-07-08 01:02:26 +0900
committerTom Rini <trini@konsulko.com>2016-07-14 18:22:44 -0400
commit4b2fd720a7b2f78c42d1565edf4c67f378c65440 (patch)
tree97c496a53008f138475a3991ac4c0ed3920ce26e /board
parent25c1b1353ce4b8188de6058f9f3b0d5d2dad8230 (diff)
downloadu-boot-imx-4b2fd720a7b2f78c42d1565edf4c67f378c65440.zip
u-boot-imx-4b2fd720a7b2f78c42d1565edf4c67f378c65440.tar.gz
u-boot-imx-4b2fd720a7b2f78c42d1565edf4c67f378c65440.tar.bz2
stm32: Change USART port to USART6 for stm32f746 discovery board
This change is to remove a halt at about 200KiB while sending a large(1MiB) binary to a micro controller using USART1. USART1 is connected to a PC via an on-board ST-Link debugger that also functions as a USB-Serial converter. However, it seems to loss some data occasionally. So I changed the serial port to USART6 and connected it to the PC using an FTDI USB-Serial cable, therefore the transmission was successfully completed. Signed-off-by: Toshifumi NISHINAGA <tnishinaga.dev@gmail.com>
Diffstat (limited to 'board')
-rw-r--r--board/st/stm32f746-disco/stm32f746-disco.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/board/st/stm32f746-disco/stm32f746-disco.c b/board/st/stm32f746-disco/stm32f746-disco.c
index 404fdfa..47aa058 100644
--- a/board/st/stm32f746-disco/stm32f746-disco.c
+++ b/board/st/stm32f746-disco/stm32f746-disco.c
@@ -32,7 +32,7 @@ const struct stm32_gpio_ctl gpio_ctl_usart = {
.otype = STM32_GPIO_OTYPE_PP,
.speed = STM32_GPIO_SPEED_50M,
.pupd = STM32_GPIO_PUPD_UP,
- .af = STM32_GPIO_AF7
+ .af = STM32_GPIO_AF8
};
const struct stm32_gpio_ctl gpio_ctl_fmc = {
@@ -251,8 +251,8 @@ int dram_init(void)
}
static const struct stm32_gpio_dsc usart_gpio[] = {
- {STM32_GPIO_PORT_A, STM32_GPIO_PIN_9}, /* TX */
- {STM32_GPIO_PORT_B, STM32_GPIO_PIN_7}, /* RX */
+ {STM32_GPIO_PORT_C, STM32_GPIO_PIN_6}, /* TX */
+ {STM32_GPIO_PORT_C, STM32_GPIO_PIN_7}, /* RX */
};
int uart_setup_gpio(void)
@@ -260,8 +260,7 @@ int uart_setup_gpio(void)
int i;
int rv = 0;
- clock_setup(GPIO_A_CLOCK_CFG);
- clock_setup(GPIO_B_CLOCK_CFG);
+ clock_setup(GPIO_C_CLOCK_CFG);
for (i = 0; i < ARRAY_SIZE(usart_gpio); i++) {
rv = stm32_gpio_config(&usart_gpio[i], &gpio_ctl_usart);
if (rv)
@@ -273,7 +272,7 @@ out:
}
static const struct stm32x7_serial_platdata serial_platdata = {
- .base = (struct stm32_usart *)USART1_BASE,
+ .base = (struct stm32_usart *)USART6_BASE,
.clock = CONFIG_SYS_CLK_FREQ,
};
@@ -292,7 +291,7 @@ int board_early_init_f(void)
int res;
res = uart_setup_gpio();
- clock_setup(USART1_CLOCK_CFG);
+ clock_setup(USART6_CLOCK_CFG);
if (res)
return res;