STM32F100片外ISO3082,RS485通讯不成功,求解…
void UART_Configuration(void)
{
NVIC_InitTypeDef NVIC_InitStructure;
USART_InitTypeDef USART_InitStructure_UART1;
USART_InitStructure_UART1.USART_BaudRate = 9600;
USART_InitStructure_UART1.USART_WordLength = USART_WordLength_8b;
USART_InitStructure_UART1.USART_StopBits = USART_StopBits_1;
USART_InitStructure_UART1.USART_Parity = USART_Parity_No ;
USART_InitStructure_UART1.USART_HardwareFlowControl = USART_HardwareFlowControl_None;
USART_InitStructure_UART1.USART_Mode = USART_Mode_Rx | USART_Mode_Tx;
USART_Init(USART1, &USART_InitStructure_UART1);
USART_ITConfig(USART1, USART_IT_RXNE, ENABLE);
USART_Cmd(USART1, ENABLE);
NVIC_PriorityGroupConfig(NVIC_PriorityGroup_0);
NVIC_InitStructure.NVIC_IRQChannel = USART1_IRQn;
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0;
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0;
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
NVIC_Init(&NVIC_InitStructure);
}