Skip to content

Commit

Permalink
Update mpu region table due to increased non-cache ram
Browse files Browse the repository at this point in the history
Additional RAM was required due to the additional number of volumes
supported from adding usb drive support.
  • Loading branch information
rechrtb committed Apr 25, 2024
1 parent 80e9861 commit c7dd0ec
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,15 +238,15 @@ void Cache::Init() noexcept
ARM_MPU_RBAR(4, IRAM_ADDR + 0x00010000),
ARM_MPU_RASR_EX(1u, ARM_MPU_AP_FULL, ARM_MPU_ACCESS_NORMAL(ARM_MPU_CACHEP_NOCACHE, ARM_MPU_CACHEP_NOCACHE, 1u), 0u, ARM_MPU_REGION_SIZE_32KB)
},
// Next 1kb RAM, read-write, shared, non-cacheable, execute disabled
// Next 2kb RAM, read-write, shared, non-cacheable, execute disabled
{
ARM_MPU_RBAR(5, IRAM_ADDR + 0x00018000),
ARM_MPU_RASR_EX(1u, ARM_MPU_AP_FULL, ARM_MPU_ACCESS_NORMAL(ARM_MPU_CACHEP_NOCACHE, ARM_MPU_CACHEP_NOCACHE, 1u), 0u, ARM_MPU_REGION_SIZE_1KB)
ARM_MPU_RASR_EX(1u, ARM_MPU_AP_FULL, ARM_MPU_ACCESS_NORMAL(ARM_MPU_CACHEP_NOCACHE, ARM_MPU_CACHEP_NOCACHE, 1u), 0u, ARM_MPU_REGION_SIZE_2KB)
},
// RAMFUNC memory. Read-only (the code has already been written to it), execution allowed. The initialised data memory follows, so it must be RW.
// 256 bytes is enough at present (check the linker memory map if adding more RAMFUNCs).
{
ARM_MPU_RBAR(6, IRAM_ADDR + 0x00018400),
ARM_MPU_RBAR(6, IRAM_ADDR + 0x00018800),
ARM_MPU_RASR_EX(0u, ARM_MPU_AP_FULL, ARM_MPU_ACCESS_NORMAL(CACHE_MODE, CACHE_MODE, 0u), 0u, ARM_MPU_REGION_SIZE_256B)
},
// Final 128kb RAM, read-write, cacheable, execute disabled
Expand Down

0 comments on commit c7dd0ec

Please sign in to comment.