i have to cinfigure an uart interface of my stm32l152 on STM32l-discovery or STM32-sk evaluation board.
I have used to configure the uart peripheral interface the example in the stm32 library called HyperTerminal_Interrupt.
The uart peripheral configuration consist of these code lines:
USART_InitStructure.USART_BaudRate = 9600;
USART_InitStructure.USART_WordLength = USART_WordLength_8b;
USART_InitStructure.USART_StopBits = USART_StopBits_2;
USART_InitStructure.USART_Parity = USART_Parity_Odd;
USART_InitStructure.USART_HardwareFlowControl = USART_HardwareFlowControl_None;
USART_InitStructure.USART_Mode = USART_Mode_Rx | USART_Mode_Tx;
STM_EVAL_COMInit(COMX, &USART_InitStructure);The STM_EVAL_COMInit is a function defined in the stm32l152d_eval.h or stm32l152_eval.h file.
Than I have modified the main to transmit continuousily the 0xAA byte with a pooling of the TC flag. The source code that I have included in the main file after at the uart configuration consist of:
while(USART_GetFlagStatus(USART3, USART_FLAG_TC) == RESET)
I don't see any data transmission on the tx pin of the uart peripheral. Also, I don't find any change in the Uart Data Register (in the register tab of the IAR EWARM).
Can sameone help me to configure the uart on the stm32l152?...I can use the STM32l-discovery or the STM32-SK evaluation board to test it.