A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
The USART Data Register (DR) is 16-bits wide, to accommodates all 9 bits (
D0
..
D8
) You should always write the DR as an ''unsigned short'' or ''u16'', if using DMA the 9-bit mode would require you send Half Words, not Bytes. -Clive /******************************************************************************* * Function Name : USART_SendData * Description : Transmits single data through the USARTx peripheral. * Input : - USARTx: Select the USART or the UART peripheral. * This parameter can be one of the following values: * - USART1, USART2, USART3, UART4 or UART5. * - Data: the data to transmit. * Output : None * Return : None *******************************************************************************/ void USART_SendData(USART_TypeDef* USARTx, u16 Data) { /* Check the parameters */ assert_param(IS_USART_ALL_PERIPH(USARTx)); assert_param(IS_USART_DATA(Data)); /* Transmit Data */ USARTx->DR = (Data & (u16)0x01FF); }
Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Posted on May 17, 2011 at 13:41 Thanks, for your anwser and your time... I base my communications in this base, and this saves me a lots af time... Thanks for your time, once more... My complements...
Have you read the description of the Multiprocessor Mode in the RM0008 Reference Manual?
A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.