2013-07-17 02:42 AM
Hey I'm running the STM32L1 chip with an XBEE unit and everything works perfectly except my Tx adds bits when there is an even number in the unsigned char (I typedef this as BYTE) being sent. Shows in Putty and X-CTU.
My code is:void init_pkg( DWORD val, __IO BYTE* buff ){ for ( int x = 0, len = TX_BUFF_SIZE - 1; x < len; x++ ) { *buff++ = val + x; } *buff++ = MSG_END_CHAR;}void xbee_IRQHandler( void ){ // -- Send buffer EMPTY interrupt -- // if ( (USART_GetITStatus( XBEE_USART, USART_IT_TXE )) != RESET ) { delay( XBEE_SEND_TMOUT ); USART_SendData( XBEE_USART, (TxBuffer[ TxCounter ] & 0x7F) ); if ( (++TxCounter) == TxBufferSize ) { USART_ITConfig( XBEE_USART, USART_IT_TXE, DISABLE ); } }}Is there something i'm missing? I've checked the whole ASCII table and always adds a MSB when there's an even number of bits set.Any help would be great as I'm lost.Cheers #discovery #stm32l #example-usart #xbee2013-07-17 03:41 AM
Sorry just found it, I'd got the parity bit setting wrong in the client side.
2015-03-16 03:58 AM
Hi
Can anybody say me how to configure for USARt half duplex in stm32l15cb . I have configured as I configured for stm32f030(working USART half duplex) but it did not work what are the changes between stm32f030 and stm32l15cb