Using UARTE - eDMA

Hi guys,

I am currently trying to make my uart work with eDMA functionality.

Up to this point I am able to read using polling, and as second method using IRQ with a message queue.

Unfortunately I could not find any concrete examples regarding eDMA.

I tried something psoted 3 years ago but it doesn't seem to work.

I am not crashing anything but the callback doesn't seem to trigger.

My hardware is also not using an HWFC

Maybe I am doing something wrong.

 UARTE driver configuration for nRF52840 

if you guys have any other ideas or suggestions please let me know.

  • Hi

    Is it correct that you are developing for nRF5340? To my knowledge, eDMA is not available for the nRF5340 and the nRF9160 (see this related case). In case you are developing for a 52 nRF52 series chip, eDMA is available, and that ticket should lead you towards your destination.

    Let me know if this answers your question!

    Kind regards,
    Andreas

  • Hi Andreas,

    So the nRF5340 doesn't offer any kind of DMA?

    The thing is that under the documentation eDMA is listed under the following:

    So now I am a bit confused whether it really does or not. If it does not then the data we get will be parsed by the CPU.
    Otherwise eDMA would be really handy
  • Hi,

    It looks like you are correct. I jumped some hoops when referring to the case in my previous answer, which says "UART without easyDMA is not available on the nRF9160 or nRF5340", and not the other way around. I will have to do some more digging into your case and I will come back before the weekend with a more definite answer!

    Kind regards,
    Andreas

  • Hi Andreas,

    Thanks for the help!

    Let me know when/if you find something.

  • Hi,

    Apologies for the delay in answer time. We are currently in the main summer vacation period here in Norway so we are running with a reduced support staff which might cause some increase in answer time

    On newer devices such as the nRF5340 or nRF9160 UARTE (UART with eDMA) is the default UART peripheral, and non-eDMA does not exist. Every sample in NCS that uses the uart, such as the central_uart and peripheral_uart contains board files that sets up the sample such that the UARTE peripheral is used. Thus for the nRF5340DK, which you are using, every sample is using UARTE. If you want to use it without eDMA (Only for 52-devices or older), you can follow what Heidi explains in the ticket I linked in a previous reply.

    I recommend that you examine those two samples, and if you have 2 boards/a board and a phone you can test them.

    I tried something psoted 3 years ago but it doesn't seem to work.

    The thing you tried which were posted 3 years ago might be out of date. Can you link or explain what you tried? It could be that the API/documentation you were following does not apply at all

    I am not crashing anything but the callback doesn't seem to trigger.

    Can you attach the code you have written for this? 

    Kind regards,
    Andreas

Related