打印
[其它]

为什么这个函数参数不包含USART6?AT32F437

[复制链接]
470|2
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
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 | 只看该作者
尝试些其他应用

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

2

主题

9

帖子

0

粉丝