Skip to content

Commit 0cf5573

Browse files
author
Anil Dali
committed
am263x: uart: Fix the uart read issue
- Updated UART_fifoRead API to replace 'readSizeRemaining' with 'tempReadSizeRemaining' variable in the while condition. - This is because, if we pass read characters more than the actual read count then tempReadSizeRemaining variable will become negative and returning negative value from UART_fifoRead API. Fixes: MCUSDK-13439 Signed-off-by: Anil Dali <anil.dali@ti.com>
1 parent 6249643 commit 0cf5573

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/drivers/uart/v0/lld/uart_v0_lld.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2621,7 +2621,7 @@ static uint32_t UART_fifoRead(UARTLLD_Handle hUart, uint8_t *buffer,
26212621

26222622
isRxReady = UART_statusIsDataReady(hUart);
26232623

2624-
while (((Bool)TRUE == isRxReady) && (0U != readSizeRemaining))
2624+
while (((Bool)TRUE == isRxReady) && (0U != tempReadSizeRemaining))
26252625
{
26262626
/* once the H/w is ready reading from the H/w */
26272627
*tempBuffer = (UInt8) UART_readByte(hUart);

0 commit comments

Comments
 (0)