asrlora / asr_lora_6601

44 stars 18 forks source link

UART RX interrupt example #1

Closed homewsn closed 2 years ago

homewsn commented 2 years ago

First, thanks for giving the opportunity to review the ASR6601 SDK.

I have a specific question about the operation of the UART in the mode of receiving bytes by interrupt. Unfortunately, I did not find such an example. The test project I implemented generally works, but for some reason the RX_DONE flag of the MIS register is not set when the interrupt handler is called after receiving a byte, although IMSC RX_DONE is 1 and an interrupt occurs.

homewsn commented 2 years ago

Sorry, it's working fine. Just the debugger reads the UART data register and clears the RX_DONE flag in front of me :)

But, by the way, are you sure that the UART_CR_UART_MODE macro and the subsequent ones in this group are correct? It seems the correct value should be 0x300 etc.

RuilinHao commented 2 years ago

Yes, you are right. It should be 0x300. Thanks very much. For the uart rx interrupts, you can take a look at the ota/dongle example.

homewsn commented 2 years ago

Ok, thanks.