cancel
Showing results for 
Search instead for 
Did you mean: 

Internal FLASH access through DMA

lpiccini
Associate II
Posted on April 14, 2011 at 19:55

Internal FLASH access through DMA

4 REPLIES 4
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 Up vote any posts that you find helpful, it shows what's working..
lpiccini
Associate II
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

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 Up vote any posts that you find helpful, it shows what's working..
lpiccini
Associate II
Posted on May 17, 2011 at 14:31

Ok, thank you a lot,

L.