mirror of https://github.com/ArduPilot/ardupilot
HAL_ChibiOS: enable ITCM and DTCM on H7 at startup
these may have been disabled by the px4 H7 bootloader
This commit is contained in:
parent
462cb806ec
commit
669c16a114
|
@ -238,6 +238,12 @@ void __early_init(void) {
|
||||||
SCB_DisableDCache();
|
SCB_DisableDCache();
|
||||||
#endif
|
#endif
|
||||||
#if defined(STM32H7)
|
#if defined(STM32H7)
|
||||||
|
|
||||||
|
// ensure ITCM and DTCM are enabled. These could be disabled by the px4
|
||||||
|
// bootloader
|
||||||
|
SCB->ITCMCR |= 1; // ITCM enable
|
||||||
|
SCB->DTCMCR |= 1; // DTCM enable
|
||||||
|
|
||||||
// disable cache on SRAM4 so we can use it for DMA
|
// disable cache on SRAM4 so we can use it for DMA
|
||||||
mpuConfigureRegion(MPU_REGION_5,
|
mpuConfigureRegion(MPU_REGION_5,
|
||||||
0x38000000U,
|
0x38000000U,
|
||||||
|
|
Loading…
Reference in New Issue