Hello,
I would like to use DMA on UART1 on the nRF9160. Can you provide an example for setting up the UART with DMA for Zephyr? I can't find any documentation or direction.
Thanks,
JL
Hello,
I would like to use DMA on UART1 on the nRF9160. Can you provide an example for setting up the UART with DMA for Zephyr? I can't find any documentation or direction.
Thanks,
JL
Hi JL,
The UART on nRF9160 uses DMA. See nRF9160 Objective Product Specification. An example can be found here.
Hope this helps!
Kind regards,
Øyvind
Hello,
Yes, I have implemented the UART in this fashion, however I don't see the benefits of DMA capability! I am getting an interrupt per byte. Upon further investigation I see that the RXD.MAXCNT is hard coded to 1 in the NRFX UART driver code. Additionally, I can't find where the API will give me the ability to set the RXD.PTR register. I see that it gets set during initialization by a start-up routine.
So, my question is, do I have API access to update RXD.MAXCNT and RXD.PTR so that I can get the full benefit of DMA?
Thanks,
JL
Please remember that the nRF9160 is a far more advanced device which uses the Zephyr OS to handle communication, drivers, peripherals etc. How did you disable the interrupts? In this case, it seems that you are getting the hard fault due to disabling the interrupts as it hard faults on a callback, part of the ISR. From the Zephyr glossary:
Interrupt Service Routine (ISR) Also known as an interrupt handler, an ISR is a callback function whose execution is triggered by a hardware interrupt (or software interrupt instructions) and is used to handle high-priority conditions that require interrupting the current code executing on the processor.
Another possible reason for the hard fault is disabling the MPU. How did you disable the MPU?
Kind regards,
Øyvind
I have the exact same issue,
how ever I did not disable any interrupt .
how did u fix it ?
I did.
but when I try to integrate the code into asset tracker, i get the error mentioned above.
Let's continue the conversation in the thread you created here: https://devzone.nordicsemi.com/f/nordic-q-a/49886/asset-tracker-uart-dma
Let's continue the conversation in the thread you created here: https://devzone.nordicsemi.com/f/nordic-q-a/49886/asset-tracker-uart-dma