Anonymous
Not applicable
Mar 18, 2013
10:50 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mar 18, 2013
10:50 PM
When I use 9bits (8bits and parity) data like below, USART doesnt work properly with WICED SDK 2.2.1.
uart_config = { .baud_rate = 115200, .data_width = DATA_WIDTH_9BIT, .parity = EVEN_PARITY, .stop_bits = STOP_BITS_1, .flow_control = FLOW_CONTROL_CTS_RTS, };
In stm32fXxx_platform.c, DMA is configured as following around line.1099.
if ( config->data_width == DATA_WIDTH_9BIT ) { dma_init_structure.DMA_PeripheralDataSize = DMA_PeripheralDataSize_HalfWord; dma_init_structure.DMA_MemoryDataSize = DMA_MemoryDataSize_HalfWord; } else { dma_init_structure.DMA_PeripheralDataSize = DMA_PeripheralDataSize_Byte; dma_init_structure.DMA_MemoryDataSize = DMA_MemoryDataSize_Byte; }
It should be fixed as below I think.
if ( config->data_width == DATA_WIDTH_9BIT ) && ( config->parity == NO_PARITY ) ...
Could you check this and give me your feedback?
Labels
- Labels:
-
UART
- Tags:
- .baud_rate
- .data_width
- .flow_control
- .parity
- .stop_bits
- 115200
- 2.2.1
- 8bits
- 9bits
- check
- config-data_width
- config-parity
- configured
- data
- data_width_9bit
- dma_init_structure.dma_memorydatasize
- dma_init_structure.dma_peripheraldatasize
- dma_memorydatasize_byte
- dma_memorydatasize_halfword
- dma_peripheraldatasize_byte
- dma_peripheraldatasize_halfword
- even_parity
- feedback
- fixed
- flow_control_cts_rts
- give
- line.1099
- no_parity
- parity
- properly
- question
- setup
- stm32fxxx_platform.c
- stop_bits_1
- uart_config
- usart
- wiced
- work
2 Replies
Anonymous
Not applicable
Mar 18, 2013
10:50 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mar 18, 2013
10:50 PM
Your configuration is confusing. You mention using 8 bits of data and 1 parity bit, yet your uart_config specifies a data_width of 9 bits. Does it work when you set data_width to be DATA_WIDTH_8BIT?
Apr 04, 2014
06:13 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apr 04, 2014
06:13 AM
Any follow up here? I'd like to close this out.