cmsis_device_h7 icon indicating copy to clipboard operation
cmsis_device_h7 copied to clipboard

D1 Domain Core prescaler array "D1CorePrescTable[16]" non-zero values for values from 0b0100 to 0b111

Open Fadi-Eid opened this issue 1 year ago • 1 comments

Caution The Issues are strictly limited for the reporting of problem encountered with the software provided in this project. For any other problem related to the STM32 product, the performance, the hardware characteristics and boards, the tools the environment in general, please post a topic in the ST Community/STM32 MCUs forum.

Describe the set-up

  • STM32H755ZIQ
  • uVision V5.39.0.0

Describe the bug in the system_stm32h7xx_dualcore_boot_cm4_cm7.c file, the function SystemCoreClockUpdate divides the value in the variable common_system_clock based on the four D1CPRE bits of the RCC_D1CFGR register. If the bits are 0b0000 to 0b0111 (0 to 7), sys_clk is not divided, but the first 8 value of the array D1CorePrescTable[16] are {0, 0, 0, 0, 1, 2, 3, 4}, which might cause a problem.

const uint8_t D1CorePrescTable[16] = {0, 0, 0, 0, 1, 2, 3, 4, 1, 2, 3, 4, 6, 7, 8, 9};

/* Compute SystemClock frequency --------------------------------------------------*/ tmp = D1CorePrescTable[(RCC->D1CFGR & RCC_D1CFGR_D1CPRE)>> RCC_D1CFGR_D1CPRE_Pos]; /* common_system_clock frequency : CM7 CPU frequency */ common_system_clock >>= tmp;

Screenshots image

Fadi-Eid avatar Apr 07 '24 16:04 Fadi-Eid

ST Internal Reference: 182575

TOUNSTM avatar May 28 '24 11:05 TOUNSTM