Skip to content

Issue with mss uart driver on FreeRTOS for tag 2023.6 #17

@aScurtu86

Description

@aScurtu86

In uart_isr()

https://github.com/polarfire-soc/platform/blob/main/drivers/mss/mss_mmuart/mss_uart.c

for IIRF_THRE the code has changed and the lines (1603-1606):
if (this_uart->tx_idx == this_uart->tx_buff_size)
{
MSS_UART_disable_irq(this_uart, MSS_UART_TBE_IRQ);
this_uart->tx_buff_size = TX_COMPLETE;
}
were moved from the end of the tx_handler routine to the the isr body right after the handler has been called.

This is an issue in case the tx_handler calls portEND_SWITCHING_ISR(xHigherPriorityTaskWoken) because a task sending data over uart will restart before returning to the ISR and in case the task wants to send someting else on the using interrupts the call will stop in MSS_UART_irq_tx() at line 357:

ASSERT(TX_COMPLETE == this_uart->tx_buff_size);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions