Does UART4 configured as UART_MODE_RX work?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-08-01 3:09 AM
I have STM32F765, did the configuration in CubeMX.
I did try to receive with:
uint8_t testData[10] = {0,};
HAL_StatusTypeDef status = 0;
status = HAL_UART_Receive(&huart4, testData, 5, 2000);
This did not work, status was HAL_TIMEOUT(I did try Receive_IT as well but the result where the same, no receive).
After changing to UART_MODE_TX_RX both funktions work as expected.
Is this correct or do i have to configure more to use half duplex only?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-08-01 9:10 AM
This is unexpected.
Read out and post content of UART4 registers when in the "non-working" state.
JW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-08-01 9:25 AM
Try simple tests of polling the UART directly, or reviewing the ISR register to confirm if you're actually receiving anything. Check basic things like clocks for GPIO, and UART, and the correct pin/AF settings.
CubeMX/HAL enforces some half-duplex, serialized operation, but that's due to stupid software design and blocking, rather than any inherent limitation of the underlying hardware.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-08-01 11:31 PM
I think i didn't understand the half duplex mode correct. I thought that the uart would just receive but in fact it is one wire if i understand the doc's correct.
Thanks for your help.
Now i'm just activating the receive interrupt and thats good enought for me.
