usart TX RX set steps:
- system clock;
- USART PIns GPIOset;
- USART_init();---more details set;
- USART_clock();
- use interrupt mode or not;
- enable the USART that you using;
-------cuiz
=========================================================
* How to use this driver
* ===================================================================
* 1. Enable peripheral clock using CLK_PeripheralClockConfig(CLK_Peripheral_USARTx,
* ENABLE) function (Refer to the product datasheet for the available USART
* peripherals)
*
* 2. Enable the external Pull-up on the used USART Pins using the
* GPIO_ExternalPullUpConfig() function or an external pull-up equivalent resistor
* (RPU = 45 KOhm typical value).
*
* 3. Program the Baud Rate, Word Length , Stop Bit, Parity and Mode (Receiver/Transmitter)
* using the USART_Init() function.
*
* 4. For synchronous mode, enable the clock and program the polarity,
* phase and last bit using the USART_ClockInit() function.
*
* 5. Enable the corresponding interrupt using the function USART_ITConfig() if you need
* to use interrupt mode.
*
* 6. When using the DMA mode
* - Configure the DMA using DMA_Init() function
* - Activate the needed channel Request using USART_DMACmd() function
*
* 7. Enable the USART using the USART_Cmd() function.
*
* 8. Enable the DMA using the DMA_Cmd() function, when using DMA mode.
*
* Refer to Multi-Processor, half-duplex, Smartcard, IrDA sub-sections for more details.
*