hal_lld_init() configures peripherals as not-secure
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11275 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
9f91962bae
commit
6b9476b133
|
@ -60,6 +60,17 @@
|
||||||
*/
|
*/
|
||||||
void hal_lld_init(void) {
|
void hal_lld_init(void) {
|
||||||
|
|
||||||
|
/* Configures peripherals as not-secure */
|
||||||
|
MATRIX0->MATRIX_SPSELR[0] = 0xFFFFFFFF;
|
||||||
|
MATRIX0->MATRIX_SPSELR[1] = 0xFFFFFFFF;
|
||||||
|
MATRIX0->MATRIX_SPSELR[2] = 0xFFFFFFFF;
|
||||||
|
MATRIX1->MATRIX_SPSELR[0] = 0xFFFFFFFF;
|
||||||
|
MATRIX1->MATRIX_SPSELR[1] = 0xFFFFFFFF;
|
||||||
|
MATRIX1->MATRIX_SPSELR[2] = 0xFFFFFFFF;
|
||||||
|
|
||||||
|
/* 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 */
|
#if (SAMA_HAL_IS_SECURE == TRUE) /* The Matrix is PAS and PMC is always configured secure */
|
||||||
/* Disabling PMC write protection. */
|
/* Disabling PMC write protection. */
|
||||||
pmcDisableWP();
|
pmcDisableWP();
|
||||||
|
|
Loading…
Reference in New Issue