Skip to main content
tkjmail2
Associate III
June 27, 2010
Question

DMA vs FSMC

  • June 27, 2010
  • 5 replies
  • 1258 views
Posted on June 27, 2010 at 16:02

DMA vs FSMC

    This topic has been closed for replies.

    5 replies

    swhite2
    Associate II
    May 17, 2011
    tkjmail2
    tkjmail2Author
    Associate III
    May 17, 2011
    Posted on May 17, 2011 at 13:55

    I think I get it now.

    So what you are saying is that the FSMC can also be interfaced directly with the MCU? And what would the consequences then be - slower data rates - slower processor, as it has to handle more?

    Best Regards

    Thomas Jespersen

    chikos332
    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 13:55

    Hi,

    You can't talk about ''difference'' between DMA and FSMC, there is no relation.

    FSMC is an interface used to control external memories (SRAM, NAND ...).

    DMA is an independent controller allowing transfers on AHB to be performed without need to use CPU.

    In case of FSMC, you can use DMA (WITH FSMC) in order to free CPU for other tasks.

    DMA will handle transfers from memory to FSMC controller without intervention of CPU. But the FSMC will physically carry the data to the external memory.

    To have a simple scheme:

      - DMA has access on the AHB/APB bus only.

      - FSMC is connected to the AHB bus like any other peripheral (well, most other peripherals are connected to the APB, but it is just a detail).

      - External memories are connected to the FSMC only, not to the AHB

     ---> DMA has no direct interface with external memories, it only interfaces with the FSMC controller.

    Is it clear enough for you ?

    damh
    Associate III
    May 17, 2011
    Posted on May 17, 2011 at 13:55

    I have to remind you of the fact, that using dma is not for free! In low power applications it can be better to use the cpu for transfers instead of the dma (dependent of default cpu load).

    chikos332
    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 13:55

    When you use CPu for FSMC transfer (or any other transfer) you loose CPU load (CPU can't do something else while transfer is ongoing).

    When you use DMA, the CPU is free to do other tasks and this increases considerably the CPU load and make you able to perform parallel operations.

    Just one point: DMA is also consuming AHB cycles used by CPU, so using DMA will also decrease a little the CPU performance if the DMA is accessing the same regions as CPU..well it is a little more complex than this short explanation, but just keep in mind that the DMA doesn't free the CPU at 100%.