USART Issue with STM32F100RB
I want to do serial communication between my PC and STM32F100RB.
the connection is as follows.
[STM32F100RB] -----[USBtoSERIAL transfer Module] --------------[PC]
PB10(Rx) <----------> TXD USB <----------> USB
PB11(Tx) <----------> RXD
Currently, the transmission from PC to STM32F100RB is working, but the transmission from STM32F100RB to PC is not. Therefore, I don't think there is any possibility that USBtoSERIAL transfefr Module is broken.
The source code is shown below.
int main(void){
…
RCC_APB1PeriphClockCmd(RCC_APB1Periph_USART3, ENABLE);
USART_InitStructure.USART_BaudRate = 115200;
USART_InitStructure.USART_WordLength = USART_WordLength_8b;
USART_InitStructure.USART_StopBits = USART_StopBits_1;
USART_InitStructure.USART_Parity = USART_Parity_No;
USART_InitStructure.USART_HardwareFlowControl = USART_HardwareFlowControl_None;
USART_InitStructure.USART_Mode = USART_Mode_Rx | USART_Mode_Tx;
USART_Init(USART3, &USART_InitStructure);
USART_Cmd(USART3, ENABLE);
while (1)
{
USART_SendData(USART3, 0x0001);
}
}I use the function USART_* in the following folder, which is provided by default in TrueStudio.
STM32F10x_StdPeriph_Driver
The following are the values of the registers that I checked on TrueStudio. They seem to be set correctly.
However, I am concerned that the value I want to send does not seem to be written in the DR register.
Could you please confirm ?