mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
Merge pull request #2491 from openmv/boot_cache
Some checks failed
🔎 Check Code Formatting / formatting-check (push) Has been cancelled
🔥 Firmware Build / build-firmware (ARDUINO_GIGA) (push) Has been cancelled
🔥 Firmware Build / build-firmware (ARDUINO_NANO_33_BLE_SENSE) (push) Has been cancelled
🔥 Firmware Build / build-firmware (ARDUINO_NANO_RP2040_CONNECT) (push) Has been cancelled
🔥 Firmware Build / build-firmware (ARDUINO_NICLA_VISION) (push) Has been cancelled
🔥 Firmware Build / build-firmware (ARDUINO_PORTENTA_H7) (push) Has been cancelled
🔥 Firmware Build / build-firmware (OPENMV2) (push) Has been cancelled
🔥 Firmware Build / build-firmware (OPENMV3) (push) Has been cancelled
🔥 Firmware Build / build-firmware (OPENMV4) (push) Has been cancelled
🔥 Firmware Build / build-firmware (OPENMV4P) (push) Has been cancelled
🔥 Firmware Build / build-firmware (OPENMVPT) (push) Has been cancelled
🔥 Firmware Build / build-firmware (OPENMV_RT1060) (push) Has been cancelled
🔥 Firmware Build / code-size-report (push) Has been cancelled
🔥 Firmware Build / stable-release (push) Has been cancelled
🔥 Firmware Build / development-release (push) Has been cancelled
Some checks failed
🔎 Check Code Formatting / formatting-check (push) Has been cancelled
🔥 Firmware Build / build-firmware (ARDUINO_GIGA) (push) Has been cancelled
🔥 Firmware Build / build-firmware (ARDUINO_NANO_33_BLE_SENSE) (push) Has been cancelled
🔥 Firmware Build / build-firmware (ARDUINO_NANO_RP2040_CONNECT) (push) Has been cancelled
🔥 Firmware Build / build-firmware (ARDUINO_NICLA_VISION) (push) Has been cancelled
🔥 Firmware Build / build-firmware (ARDUINO_PORTENTA_H7) (push) Has been cancelled
🔥 Firmware Build / build-firmware (OPENMV2) (push) Has been cancelled
🔥 Firmware Build / build-firmware (OPENMV3) (push) Has been cancelled
🔥 Firmware Build / build-firmware (OPENMV4) (push) Has been cancelled
🔥 Firmware Build / build-firmware (OPENMV4P) (push) Has been cancelled
🔥 Firmware Build / build-firmware (OPENMVPT) (push) Has been cancelled
🔥 Firmware Build / build-firmware (OPENMV_RT1060) (push) Has been cancelled
🔥 Firmware Build / code-size-report (push) Has been cancelled
🔥 Firmware Build / stable-release (push) Has been cancelled
🔥 Firmware Build / development-release (push) Has been cancelled
bootloader: Fix stm32 cache disable.
This commit is contained in:
commit
e51f511809
@ -55,6 +55,18 @@ void USB2_IRQ_Handler(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int port_init(void) {
|
int port_init(void) {
|
||||||
|
#ifdef __DCACHE_PRESENT
|
||||||
|
// Clean I-Cache if enabled.
|
||||||
|
if ((SCB->CCR & (uint32_t) SCB_CCR_IC_Msk)) {
|
||||||
|
SCB_InvalidateICache();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Clean D-Cache if enabled.
|
||||||
|
if ((SCB->CCR & (uint32_t) SCB_CCR_DC_Msk)) {
|
||||||
|
SCB_CleanInvalidateDCache();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
HAL_Init();
|
HAL_Init();
|
||||||
|
|
||||||
// Configure the system clocks.
|
// Configure the system clocks.
|
||||||
@ -114,8 +126,15 @@ int port_deinit(void) {
|
|||||||
USB_OTG_PHY_CLK_DISABLE();
|
USB_OTG_PHY_CLK_DISABLE();
|
||||||
|
|
||||||
#ifdef __DCACHE_PRESENT
|
#ifdef __DCACHE_PRESENT
|
||||||
// Clean/invalidate any cached lines.
|
// Disable I-Cache if enabled.
|
||||||
SCB_CleanInvalidateDCache();
|
if ((SCB->CCR & (uint32_t) SCB_CCR_IC_Msk)) {
|
||||||
|
SCB_DisableICache();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Disable D-Cache if enabled.
|
||||||
|
if ((SCB->CCR & (uint32_t) SCB_CCR_DC_Msk)) {
|
||||||
|
SCB_DisableDCache();
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Clear default regions and configure XIP regions (if any).
|
// Clear default regions and configure XIP regions (if any).
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user