We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9c4c630 + 9c99d7e commit 7e0f75eCopy full SHA for 7e0f75e
platform/mbed_application.c
@@ -23,11 +23,33 @@
23
24
#if defined(__CORTEX_A9)
25
26
+static void powerdown_gic(void);
27
+
28
void mbed_start_application(uintptr_t address)
29
{
30
+ __disable_irq();
31
+ powerdown_gic();
32
+ __enable_irq();
33
((void(*)())address)();
34
}
35
36
+static void powerdown_gic()
37
+{
38
+ int i;
39
+ int j;
40
41
+ for (i = 0; i < 32; i++) {
42
+ GICDistributor->ICENABLER[i] = 0xFFFFFFFF;
43
+ GICDistributor->ICPENDR[i] = 0xFFFFFFFF;
44
+ if (i < 4) {
45
+ GICDistributor->CPENDSGIR[i] = 0xFFFFFFFF;
46
+ }
47
+ for (j = 0; j < 8; j++) {
48
+ GICDistributor->IPRIORITYR[i*8+j] = 0x00000000;
49
50
51
+}
52
53
#else
54
55
static void powerdown_nvic(void);
0 commit comments