Skip to main content
lpiccini
Associate
April 14, 2011
Question

Internal FLASH access through DMA

  • April 14, 2011
  • 4 replies
  • 1101 views
Posted on April 14, 2011 at 19:55

Internal FLASH access through DMA

    This topic has been closed for replies.

    4 replies

    Tesla DeLorean
    Guru
    May 17, 2011
    Posted on May 17, 2011 at 14:31

    Writing to FLASH using DMA is a pointless exercise, and not an appropriate way of programming the device. Suggest you read the application note about flash programming, and look at some of the example code.

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    Tesla DeLorean
    Guru
    May 17, 2011
    Posted on May 17, 2011 at 14:31

    The internal flash can be used for general storage, however be aware of it's erase cycle limits, blocking size and the serious stalling it causes to the CPU when code is executing from FLASH. The latter being an almost fatal problem for any process requiring low interrupt latency.

    Become familiar with how to program the flash memory (read the documentation, look at the examples), and realize how that process drastically differs from a generic bus write cycle to say RAM or peripherals. It should be clear at that point why a DMA write to flash is a recipe for failure.

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    lpiccini
    lpicciniAuthor
    Associate
    May 17, 2011
    Posted on May 17, 2011 at 14:31

    Thank you Clive, but I'm not sure I've well-explained my problem. I'm not trying to strictly ''program the flash'', but I'm trying to use the internal flash as ''mass storage'' for the application, in order to avoid an external one, so reducing the product costs. I'm trying to introduce a ''DMA-based'' management of our filesystem instead of using normal access functions. Is it possible in your opinion?

    Thanks a lot

    Luca

    lpiccini
    lpicciniAuthor
    Associate
    May 17, 2011
    Posted on May 17, 2011 at 14:31

    Ok, thank you a lot,

    L.