change baudrate to 56000bps
parent
eba5553338
commit
93fc34a75c
|
@ -6,7 +6,7 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
*
|
*
|
||||||
* <h2><center>© Copyright (c) 2020 STMicroelectronics.
|
* <h2><center>© Copyright (c) 2021 STMicroelectronics.
|
||||||
* All rights reserved.</center></h2>
|
* All rights reserved.</center></h2>
|
||||||
*
|
*
|
||||||
* This software component is licensed by ST under Ultimate Liberty license
|
* This software component is licensed by ST under Ultimate Liberty license
|
||||||
|
@ -32,7 +32,7 @@ void MX_UART4_Init(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
huart4.Instance = UART4;
|
huart4.Instance = UART4;
|
||||||
huart4.Init.BaudRate = 115200;
|
huart4.Init.BaudRate = 56000;
|
||||||
huart4.Init.WordLength = UART_WORDLENGTH_8B;
|
huart4.Init.WordLength = UART_WORDLENGTH_8B;
|
||||||
huart4.Init.StopBits = UART_STOPBITS_1;
|
huart4.Init.StopBits = UART_STOPBITS_1;
|
||||||
huart4.Init.Parity = UART_PARITY_NONE;
|
huart4.Init.Parity = UART_PARITY_NONE;
|
||||||
|
@ -51,7 +51,7 @@ void MX_USART1_UART_Init(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
huart1.Instance = USART1;
|
huart1.Instance = USART1;
|
||||||
huart1.Init.BaudRate = 115200;
|
huart1.Init.BaudRate = 56000;
|
||||||
huart1.Init.WordLength = UART_WORDLENGTH_8B;
|
huart1.Init.WordLength = UART_WORDLENGTH_8B;
|
||||||
huart1.Init.StopBits = UART_STOPBITS_1;
|
huart1.Init.StopBits = UART_STOPBITS_1;
|
||||||
huart1.Init.Parity = UART_PARITY_NONE;
|
huart1.Init.Parity = UART_PARITY_NONE;
|
||||||
|
@ -172,7 +172,23 @@ void HAL_UART_MspDeInit(UART_HandleTypeDef* uartHandle)
|
||||||
|
|
||||||
/* USER CODE BEGIN 1 */
|
/* USER CODE BEGIN 1 */
|
||||||
|
|
||||||
|
//printf redirect
|
||||||
|
#ifdef __GNUC__
|
||||||
|
//#define PUTCHAR_PROTOTYPE int __io_putchar(int ch)
|
||||||
|
#define PUTCHAR_PROTOTYPE int putchar(int ch)
|
||||||
|
#else
|
||||||
|
#define PUTCHAR_PROTOTYPE int fputc(int ch, FILE *f)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
PUTCHAR_PROTOTYPE
|
||||||
|
{
|
||||||
|
// uint8_t time_out=3;
|
||||||
|
// while(!__HAL_UART_GET_FLAG(&huart1,UART_FLAG_TXE) && time_out--){
|
||||||
|
// HAL_Delay(1);
|
||||||
|
// }
|
||||||
|
HAL_UART_Transmit(&huart1,(uint8_t *)&ch,1,100);
|
||||||
|
return ch;
|
||||||
|
}
|
||||||
|
|
||||||
/* USER CODE END 1 */
|
/* USER CODE END 1 */
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* @Author: CK.Zh
|
* @Author: CK.Zh
|
||||||
* @Date: 2020-02-20 11:39:38
|
* @Date: 2020-02-20 11:39:38
|
||||||
* @LastEditors: CK.Zh
|
* @LastEditors: CK.Zh
|
||||||
* @LastEditTime: 2020-04-30 10:15:25
|
* @LastEditTime: 2021-01-05 16:21:59
|
||||||
-->
|
-->
|
||||||
# NaviKit_stm32
|
# NaviKit_stm32
|
||||||
PM1导航套件中电源控制板源码,STM32F107VCT6,开发环境STM32CubeIDE
|
PM1导航套件中电源控制板源码,STM32F107VCT6,开发环境STM32CubeIDE
|
||||||
|
@ -32,3 +32,4 @@
|
||||||
`void HAL_PCD_IRQHandler(PCD_HandleTypeDef *hpcd)`函数内
|
`void HAL_PCD_IRQHandler(PCD_HandleTypeDef *hpcd)`函数内
|
||||||
`HAL_PCD_SuspendCallback(hpcd); `代码段 务必屏蔽,否则导致枚举失败,提示获取设备描述符失败。
|
`HAL_PCD_SuspendCallback(hpcd); `代码段 务必屏蔽,否则导致枚举失败,提示获取设备描述符失败。
|
||||||
|
|
||||||
|
> EC日志输出口波特率为56000bps
|
Loading…
Reference in New Issue