Please help to review the follow code;
When I open the comment for change the uart priority to 2, uart can not send data.
void uart_init(void) {
uint8_t uart_proi = 0;
UART_Init(&uart_pal1_instance, &uart_pal1_Config0);
INT_SYS_DisableIRQ(LPUART1_RxTx_IRQn);
uart_proi = INT_SYS_GetPriority(LPUART1_RxTx_IRQn);
// INT_SYS_SetPriority(LPUART1_RxTx_IRQn, 2);
uart_proi = INT_SYS_GetPriority(LPUART1_RxTx_IRQn);
INT_SYS_EnableIRQ(LPUART1_RxTx_IRQn);
GE_LOGI(LOG_TAG "uart_proi = %d", __func__, uart_proi);
// start uart rx
UART_ReceiveData(&uart_pal1_instance, uart_rx_buf, 1);
}
void uart_send_data(uint8_t *data, uint32_t size) {
uint32_t bytesRemaining;
UART_SendData(&uart_pal1_instance, data, size);
// blocking here if change priority
while (UART_GetTransmitStatus(&uart_pal1_instance, &bytesRemaining) != STATUS_SUCCESS) {
}
}