ART ON/OFF가 보이는데 정작 끄는법이나 켜는 법 혹은 클럭 트리에서 설정법이 안보여서 찾는데..
G4는 아닌 F4 쪽에서는 아래의 명령을 이용해서 켜고 끈다고 한다.
| FLASH->ACR = FLASH_ACR_ICEN |FLASH_ACR_DCEN |FLASH_ACR_LATENCY_5WS; |
[링크 : https://community.st.com/t5/stm32-mcus-products/enable-disable-art-accelerator/td-p/551007]

[링크 : https://www.st.com/resource/en/product_training/STM32G4-Memory-Flash_FLASH.pdf]
| 3.1 Firmware tips and tricks 3.1.1 Common firmware configuration ART configuration The ART Accelerator™ is a memory accelerator which is optimized for STM32 ARM® Cortex™-Mx processors. It balances the inherent performance advantage of the ARM Cortex-Mx over Flash memory technologies, which normally requires the processor to wait for the Flash memory at higher operating frequencies. Thanks to the ART Accelerator™, the CPU can operate up to 120 MHz without wait states, thereby increasing the overall system speed and efficiency. To release the full processor 150 DMIPS performance at this frequency, the accelerator implements an instruction prefetch queue and instruction/data, which enables program execution from Flash memory at up to 120 MHz without wait states. To avoid extra power consumption it is recommended to configure the ART as follows: /* Disable prefetch buffer */ FLASH->ACR & = ~FLASH_ACR_PRFTEN; /* Enable flash instruction cache */ FLASH->ACR |= FLASH_ACR_ICEN; /* Enable flash data cache */ FLASH->ACR |= FLASH_ACR_DCEN; The system performance can be adjusted to the current needs. This can be done either from start, according to performance estimations, or on-the-fly on a running system to adjust the performance to the current condition. In this way the prefetch can be enabled or disabled on-the-fly depending on user needs. Disabling the prefetch buffer avoids extra Flash access that consumes 20 mA for 128-bit line fetching. |
[링크 : https://www.st.com/resource/en/application_note/dm00033348.pdf]
| I read in that document: STMicroelectronics: AN3430 - Application Note of How to achieve the lowest current consumption with STM32F2xx On page 17 (3.1.1) they say that enabling the buffer prefetch will consume additional 20mA (for 128-bit-line fetching). Maybe at 168 MHz you power supply gets unstable?? Maybe you can try it with lower clock speed (120MHz), where the cpu is very power efficient. |
[링크 : https://stackoverflow.com/questions/11358547/how-to-enable-art-accelerator-stm32f407vgt6]
그래서 프로젝트에서 검색해보니 이렇게 걸려 나오는데
| HAL_StatusTypeDef HAL_FLASHEx_Erase(FLASH_EraseInitTypeDef *pEraseInit, uint32_t *PageError) HAL_StatusTypeDef HAL_FLASHEx_Erase_IT(FLASH_EraseInitTypeDef *pEraseInit) __RAM_FUNC HAL_StatusTypeDef HAL_FLASHEx_OB_DBankConfig(uint32_t DBankConfig) HAL_StatusTypeDef HAL_FLASH_Program(uint32_t TypeProgram, uint32_t Address, uint64_t Data) HAL_StatusTypeDef HAL_FLASH_Program_IT(uint32_t TypeProgram, uint32_t Address, uint64_t Data) |

ICEN은 Program 쪽에서는 빠진다. 아무래도 데이터 쪽이라 그런가?
| HAL_StatusTypeDef HAL_FLASHEx_Erase(FLASH_EraseInitTypeDef *pEraseInit, uint32_t *PageError) HAL_StatusTypeDef HAL_FLASHEx_Erase_IT(FLASH_EraseInitTypeDef *pEraseInit) __RAM_FUNC HAL_StatusTypeDef HAL_FLASHEx_OB_DBankConfig(uint32_t DBankConfig) |

'embeded > Cortex-M4 STM' 카테고리의 다른 글
| stm32g473 flash doubleword (0) | 2026.02.04 |
|---|---|
| STM32G47x dual bank flash (0) | 2026.02.03 |
| STM32F429I-DISC1 with lvgl (0) | 2026.02.03 |
| 32F469IDISCOVERY with lvgl (0) | 2026.02.02 |
| UM2195 audio streaming Expansion Package for STM32Cube (0) | 2026.01.05 |
