I've been using mmu.c to setup my MMU table and enable the caches - for months now, so I think that part is OK.
Now I need to disable the icache, dcache and mmu, do some stuff and re-enable them.
But when I disable the cache, the prog starts to behave like it has a will of its own.
If I don't disable the cache, then it works normally.
Please take a look...
// creates a mmu level 1 table with flat address space.
#define not_cacheable (1 20) #define SDRAMend ((AT91C_EBI_SDRAM + SDRAMsize) >> 20)
static void mmu (void) { uint f; uint *pSDRAM = (uint*) AT91C_EBI_SDRAM;
// create table // setup all linear addresses, AP(3), domain(0), bit 4(1) // as non-cacheable and as invalid entry for (f = 0; f