Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

Studio Bluetooth Forum Discussions

ClCh_1720121
Level 1
Level 1
5 likes given First like received 5 replies posted

Dear Sir,

How to get the result whether the wiced_hal_puart_synchronous_write(UINT8* buffer,UINT32 length) finished or not ? Is there any method ?

How to get 20706 PUART TX FIFO in new SDK ? There is no API for PUART TX FIFO in the new SDK.

Best Regards,

Cloud Chen.

0 Likes
1 Solution
Owen_Zhang123
Moderator
Moderator
Moderator
500 solutions authored 250 sign-ins 1000 replies posted

Please use the following function to check the tx fifo:

enum

{

    P_UART_LSR_TX_FIFO_NOT_EMPTY                   = 0x0004, //'0':Data NOT available, '1':Data available

    P_UART_LSR_TX_IDLE                             = 0x0008,

    P_UART_LSR_END_DELIMETER_NOT_DONE_MASK         = 0x0010

};

#define dc_ptu_uart2_lsr_adr                           0x00352224       

#define P_UART_LINE_STATUS_ADDR                         dc_ptu_uart2_lsr_adr

#define P_UART_TX_FIFO_IS_EMPTY()    ( ( REG32(P_UART_LINE_STATUS_ADDR) & ( P_UART_LSR_TX_FIFO_NOT_EMPTY | P_UART_LSR_TX_IDLE ) ) == P_UART_LSR_TX_IDLE )

View solution in original post

1 Reply
Owen_Zhang123
Moderator
Moderator
Moderator
500 solutions authored 250 sign-ins 1000 replies posted

Please use the following function to check the tx fifo:

enum

{

    P_UART_LSR_TX_FIFO_NOT_EMPTY                   = 0x0004, //'0':Data NOT available, '1':Data available

    P_UART_LSR_TX_IDLE                             = 0x0008,

    P_UART_LSR_END_DELIMETER_NOT_DONE_MASK         = 0x0010

};

#define dc_ptu_uart2_lsr_adr                           0x00352224       

#define P_UART_LINE_STATUS_ADDR                         dc_ptu_uart2_lsr_adr

#define P_UART_TX_FIFO_IS_EMPTY()    ( ( REG32(P_UART_LINE_STATUS_ADDR) & ( P_UART_LSR_TX_FIFO_NOT_EMPTY | P_UART_LSR_TX_IDLE ) ) == P_UART_LSR_TX_IDLE )