aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/ports/SAMA/SAMA5D2x
diff options
context:
space:
mode:
authoredolomb <none@example.com>2018-01-16 20:41:52 +0000
committeredolomb <none@example.com>2018-01-16 20:41:52 +0000
commit42fd5566d533d39959b669a7333d88445757cff5 (patch)
tree715528e19a2966a7eed8e7b96a11ad085b92388a /os/hal/ports/SAMA/SAMA5D2x
parentbae22c6d4ba9d0a23ad16159b105964ca8813f0d (diff)
downloadChibiOS-42fd5566d533d39959b669a7333d88445757cff5.tar.gz
ChibiOS-42fd5566d533d39959b669a7333d88445757cff5.tar.bz2
ChibiOS-42fd5566d533d39959b669a7333d88445757cff5.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11296 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/ports/SAMA/SAMA5D2x')
-rw-r--r--os/hal/ports/SAMA/SAMA5D2x/hal_lld.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/os/hal/ports/SAMA/SAMA5D2x/hal_lld.c b/os/hal/ports/SAMA/SAMA5D2x/hal_lld.c
index e1a23c14b..f598bf856 100644
--- a/os/hal/ports/SAMA/SAMA5D2x/hal_lld.c
+++ b/os/hal/ports/SAMA/SAMA5D2x/hal_lld.c
@@ -60,6 +60,10 @@
*/
void hal_lld_init(void) {
+#if (SAMA_HAL_IS_SECURE == TRUE) /* The Matrix is PAS and PMC is always configured secure */
+ /* Disabling PMC write protection. */
+ pmcDisableWP();
+
/* Configures peripherals as not-secure */
MATRIX0->MATRIX_SPSELR[0] = 0xFFFFFFFF;
MATRIX0->MATRIX_SPSELR[1] = 0xFFFFFFFF;
@@ -71,10 +75,6 @@ void hal_lld_init(void) {
/* Configures PMC and RTC as secure */
mtxConfigPeriphSecurity(MATRIX1, ID_SYSC, SECURE_PER);
-#if (SAMA_HAL_IS_SECURE == TRUE) /* The Matrix is PAS and PMC is always configured secure */
- /* Disabling PMC write protection. */
- pmcDisableWP();
-
/* Enabling matrix clock */
pmcEnableH32MX();
pmcEnableH64MX();