AT91RM9200串口问题,欢迎大家交流
RM9200四个串口,普通232模式调试通过,485模式下,US0和US2不能接收,经检查,RTS没信号。根据RM9200 datasheet,对这两个串口配置io如下:
//
__inline void YAT91F_US0_CfgPIO (void)
{
// Configure PIO controllers to periph mode
AT91F_PIO_CfgPeriph(
AT91C_BASE_PIOA, // PIO controller base address
((unsigned int) AT91C_PA17_TXD0 ) |
((unsigned int) AT91C_PA21_RTS0 ) |
((unsigned int) AT91C_PA18_RXD0 ) |
((unsigned int) AT91C_PA20_CTS0 ), // Peripheral A
0); // Peripheral B
}
//
__inline void YAT91F_US2_CfgPIO (void)
{
// Configure PIO controllers to periph mode
AT91F_PIO_CfgPeriph(
AT91C_BASE_PIOA, // PIO controller base address
((unsigned int) AT91C_PA23_TXD2 ) |
((unsigned int) AT91C_PA22_RXD2 ), // Peripheral A
((unsigned int) AT91C_PA30_CTS2 ) |
((unsigned int) AT91C_PA31_RTS2 )); // Peripheral B
}
问题在哪?欢迎探讨指点。msn: yangzhengyong@hotmail.com