This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Efficient use of uDMA

I am currently working on LM4F232H5DQ to build simple oscilloscope like functionality.

CPU running @ 80MHz and ADC running @ 1MSPS in "Always On" mode.

I managed to configure ADC with uDMA in PingPong mode. This configuration puts samples continuously in one large buffer from where my main can process.

It works fine and displays waveform nicely but I can see small discontinuity in the waveform. Looks like some samples are missing.

I believe, this is due to bus arbitration between Processor & uDMA as they uses same bus to access SRAM.

So, while CPU is accessing SRAM, uDMA can not put samples in the buffer since it uses only idle bus.

As per my understanding, I cannot overcome this problem but still I believe there should be any configuration to come out. Is there any??

  • I think I found my way, I managed may software in such a way that CPU reduces SRAM access while uDMA is filling the main buffer ( by stopping heavy calculations while DMA is in progress ). Once buffer is full, I start my calculations till I reach to the end of buffer. Then again start uDMA and stop calculations...

    This way I can display data in page by page.

  • But then, you have discontinuities from one signal block to the next.

    Am I right?

    I thought that ping pong technique avoided that kind of problem.

    Regards

  • PAk SY said:
    I thought that ping pong technique avoided that kind of problem.

    Make this vote #2 for, "proper" ping-pong's ability to avoid/minimize.  (we used often in display-world - enabled "new screen draw" - w/out degrading "view screen...")

    Also - use of 2nd ADC w/in MCU - and exploitation of ADC phase - may double your acquisition rate.  (perhaps w/out "pain...")

  • Hello Can u send me your code Pleas i am new use arm processors. my knowledge about udma is not clear pleas post ur code i will be thank full to u.