aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/ports/STM32/STM32F7xx/hal_lld.c
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2015-09-04 10:32:55 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2015-09-04 10:32:55 +0000
commit9ce134193104f8349fcf523cf2c25fce499cc6ef (patch)
tree82cbe2c6641d3026ebe551a5da4a3938dccc6930 /os/hal/ports/STM32/STM32F7xx/hal_lld.c
parentc1f3c5cb218e185c805f0b7a50a8ad81aa6e2de0 (diff)
downloadChibiOS-9ce134193104f8349fcf523cf2c25fce499cc6ef.tar.gz
ChibiOS-9ce134193104f8349fcf523cf2c25fce499cc6ef.tar.bz2
ChibiOS-9ce134193104f8349fcf523cf2c25fce499cc6ef.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8275 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/ports/STM32/STM32F7xx/hal_lld.c')
-rw-r--r--os/hal/ports/STM32/STM32F7xx/hal_lld.c23
1 files changed, 8 insertions, 15 deletions
diff --git a/os/hal/ports/STM32/STM32F7xx/hal_lld.c b/os/hal/ports/STM32/STM32F7xx/hal_lld.c
index 84e27a251..adc645832 100644
--- a/os/hal/ports/STM32/STM32F7xx/hal_lld.c
+++ b/os/hal/ports/STM32/STM32F7xx/hal_lld.c
@@ -128,22 +128,16 @@ void hal_lld_init(void) {
#if defined(STM32_DMA_REQUIRED)
dmaInit();
+#endif
-#if 0 /*defined(STM32F7XX)*/
- /* If the DMA is in use then the DMA-accessible RAM must be programmed as
- Write Through using the MPU, region zero is used with a size of 512kB,
- the sub-regions are programmed as follow:
- - 0,, disabled, it is the normal the DTCM RAM.
- - 1..4, enabled, it is the normal, DMA-accessible, RAM.
- - 5..7, disabled, beyond RAM area.
- The system memory layout is used as "background" for the MPU regions.*/
- mpuConfigureRegion(MPU_REGION_0,
- 0x20000000U,
+#if STM32_SRAM2_NOCACHE
+ /* The SRAM2 bank can optionally made a non cache-able area for use by
+ DMA engines.*/
+ mpuConfigureRegion(MPU_REGION_7,
+ 0x2004C000U,
MPU_RASR_ATTR_AP_RW_RW |
- MPU_RASR_ATTR_CACHEABLE_WT_NWA |
- MPU_RASR_SRD_DISABLE_SUB0 | MPU_RASR_SRD_DISABLE_SUB5 |
- MPU_RASR_SRD_DISABLE_SUB6 | MPU_RASR_SRD_DISABLE_SUB7 |
- MPU_RASR_SIZE_512K |
+ MPU_RASR_ATTR_NON_CACHEABLE |
+ MPU_RASR_SIZE_16K |
MPU_RASR_ENABLE);
mpuEnable(MPU_CTRL_PRIVDEFENA);
@@ -151,7 +145,6 @@ void hal_lld_init(void) {
immediately.*/
SCB_CleanInvalidateDCache();
#endif
-#endif
/* Programmable voltage detector enable.*/
#if STM32_PVD_ENABLE