需求是不占CPU的动态接收串口变长数据,代码类似下面的
`hosal_uart_init()
hosal_uart_callback_set(HOSAL_UART_RX_CALLBACK, _rx_callback)
hosal_uart_ioctl(HOSAL_UART_MODE_SET, HOSAL_UART_MODE_INT)
hosal_uart_ioctl(HOSAL_UART_DMA_RX_START)
... waiting rx int ...
rx_size = DMA_Channel_TranferSize(uart->dma_rx_chan)
hosal_dma_chan_stop(uart->dma_rx_chan)
// rx_size is always the same of config size in dma_config`
现象是每次中断触发的都是UART_INT_RX_FIFO_REQ,然后DMA缓冲区里没有接收的数据
测试工程连接