[其它] 为什么这个函数参数不包含USART6?AT32F437

[复制链接]
 楼主| tcklc 发表于 2023-8-30 09:45 | 显示全部楼层 |阅读模式
/**
  * @brief  enable or disable the usart's rs485 mode.
  * @param  usart_x: select the usart or the uart peripheral.
  *         this parameter can be one of the following values:
  *         USART1, USART2, USART3
  * @param  new_state: new state of the irda mode.
  *         this parameter can be: TRUE or FALSE.
  * @retval none
  */
void usart_rs485_mode_enable(usart_type* usart_x, confirm_state new_state)
{
    usart_x->ctrl3_bit.rs485en = new_state;
}
 楼主| tcklc 发表于 2023-8-30 11:44 | 显示全部楼层
从AT32F437手册上看, USART6是支持485模式,芯片也有相应的RTS_DE管脚输出。但官方的固件相关函数包括usart_rs485_delay_time_config、usart_de_polarity_set、usart_rs485_mode_enable等相关函数只针对USART1、USART2和USART3,不包括USART6,事实上用这几个参数和使能相关RTS_DE管脚无法实现RS485自动发送,同样的配置用于USART1\USART2\USART3就可以。
langgq 发表于 2023-8-31 19:39 | 显示全部楼层
尝试些其他应用
您需要登录后才可以回帖 登录 | 注册

本版积分规则

3

主题

11

帖子

0

粉丝
快速回复 返回顶部 返回列表