Skip to content

Commit 89d239e

Browse files
kjbraceyCruz Monrreal II
authored andcommitted
Test MPU is enabled by init
1 parent 243167e commit 89d239e

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

TESTS/mbed_hal/mpu/main.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,9 @@ static void hard_fault_handler_test()
7272

7373
static void mpu_fault_test(const volatile uint16_t *mem_function)
7474
{
75-
mbed_mpu_init();
76-
77-
// Verify that the mpu causes faults when executing ram
75+
// Verify that the mpu causes faults when executing ram after init
7876
fault_count = 0;
79-
mbed_mpu_enable_ram_xn(true);
77+
mbed_mpu_init();
8078
call_mem(mem_function);
8179
TEST_ASSERT_EQUAL(1, fault_count);
8280

@@ -86,7 +84,7 @@ static void mpu_fault_test(const volatile uint16_t *mem_function)
8684
call_mem(mem_function);
8785
TEST_ASSERT_EQUAL(0, fault_count);
8886

89-
// Verify that the mpu causes faults when executing ram
87+
// Verify that the mpu can be turned back on
9088
fault_count = 0;
9189
mbed_mpu_enable_ram_xn(true);
9290
call_mem(mem_function);

0 commit comments

Comments
 (0)