aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--os/hal/ports/SAMA/SAMA5D2x/hal_lld.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/os/hal/ports/SAMA/SAMA5D2x/hal_lld.c b/os/hal/ports/SAMA/SAMA5D2x/hal_lld.c
index 9f780c3ec..c23de6eff 100644
--- a/os/hal/ports/SAMA/SAMA5D2x/hal_lld.c
+++ b/os/hal/ports/SAMA/SAMA5D2x/hal_lld.c
@@ -59,6 +59,17 @@
* @notapi
*/
void hal_lld_init(void) {
+
+ /* Disabling PMC write protection. */
+ pmcDisableWP();
+
+ /* Enabling matrix clock */
+ pmcEnableH32MX();
+ pmcEnableH64MX();
+
+ /* Enabling write protection. */
+ pmcEnableWP();
+
#if defined(SAMA_DMA_REQUIRED)
dmaInit();
#endif