Skip to content

Commit

Permalink
chore: disable prefetch, for testing purposes only
Browse files Browse the repository at this point in the history
  • Loading branch information
pfeerick committed Jul 8, 2024
1 parent 4a9e943 commit 2b9d0be
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion radio/src/targets/common/arm/stm32/f2/system_stm32f2xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ static void SetSysClock(void)
}

/* Configure Flash prefetch, Instruction cache, Data cache and wait state */
FLASH->ACR = FLASH_ACR_PRFTEN |FLASH_ACR_ICEN |FLASH_ACR_DCEN |FLASH_ACR_LATENCY_3WS;
FLASH->ACR = FLASH_ACR_ICEN |FLASH_ACR_DCEN |FLASH_ACR_LATENCY_3WS;

/* Select the main PLL as system clock source */
RCC->CFGR &= (uint32_t)((uint32_t)~(RCC_CFGR_SW));
Expand Down
2 changes: 1 addition & 1 deletion radio/src/targets/common/arm/stm32/f4/system_stm32f4xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ static void SetSysClock(void)
}

/* Configure Flash prefetch, Instruction cache, Data cache and wait state */
FLASH->ACR = FLASH_ACR_PRFTEN | FLASH_ACR_ICEN | FLASH_ACR_DCEN | FLASH_ACR_LATENCY_5WS;
FLASH->ACR = FLASH_ACR_ICEN | FLASH_ACR_DCEN | FLASH_ACR_LATENCY_5WS;

/* Select the main PLL as system clock source */
RCC->CFGR &= (uint32_t)((uint32_t)~(RCC_CFGR_SW));
Expand Down
4 changes: 0 additions & 4 deletions radio/src/targets/horus/board.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,6 @@ void boardInit()
board_set_bor_level();
#endif

#if defined(RADIO_TX16S)
FLASH_PrefetchBufferCmd(DISABLE);
#endif

pwrInit();

#if defined(FUNCTION_SWITCHES) && !defined(DEBUG_SEGGER_RTT)
Expand Down
1 change: 0 additions & 1 deletion radio/src/targets/taranis/board.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ void boardInit()
#if defined(MANUFACTURER_RADIOMASTER) && defined(STM32F407xx)
void board_set_bor_level();
board_set_bor_level();
FLASH_PrefetchBufferCmd(DISABLE);
#endif

board_trainer_init();
Expand Down

0 comments on commit 2b9d0be

Please sign in to comment.