8000 stm32wb55/rfcore: Use Sem7 for flash cpu synchronisation. · micropython/micropython@426e57f · GitHub
[go: up one dir, main page]

Sk 8000 ip to content

Commit 426e57f

Browse files
committed
stm32wb55/rfcore: Use Sem7 for flash cpu synchronisation.
Signed-off-by: Andrew Leech <andrew.leech@planetinnovation.com.au>
1 parent 7002a19 commit 426e57f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

ports/stm32/rfcore.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@
7676
#define OCF_C2_FLASH_ERASE_ACTIVITY (0x69)
7777
#define OCF_C2_SET_FLASH_ACTIVITY_CONTROL (0x73)
7878

79+
#define FLASH_ACTIVITY_CONTROL_PES (0)
80+
#define FLASH_ACTIVITY_CONTROL_SEM7 (1)
81+
7982
#define HCI_OPCODE(ogf, ocf) ((ogf) << 10 | (ocf))
8083

8184
#define HCI_KIND_BT_CMD (0x01) // <kind=1>...?
@@ -611,8 +614,8 @@ void rfcore_ble_init(void) {
611614
rfcore_ble_reset();
612615
}
613616

614-
// Enable PES rather than SEM7 to moderate flash access between the cores.
615-
uint8_t buf = 0; // FLASH_ACTIVITY_CONTROL_PES
617+
// Enable SEM7 rather than PES to moderate flash access between the cores.
618+
uint8_t buf = FLASH_ACTIVITY_CONTROL_SEM7;
616619
tl_sys_hci_cmd_resp(HCI_OPCODE(OGF_VENDOR, OCF_C2_SET_FLASH_ACTIVITY_CONTROL), &buf, 1, 0);
617620
}
618621

0 commit comments

Comments
 (0)
0