Skip to main content
Uwe Bonnes
Chief
April 19, 2016
Question

Bad APBAHBPrescTable

  • April 19, 2016
  • 2 replies
  • 500 views
Posted on April 19, 2016 at 17:18

Hello,

all ???_rcc.c files, e.g. STM32Cube_FW_F7_V1.3.0/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_rcc.c

define

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

This contradicts the description in the reference manual

Bits 7:4 HPRE[3:0]: AHB prescaler

          These bits are set and cleared by software to control the division factor of the AHB clock.

           0xxx: SYSCLK not divided

The definition shoud read

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

    This topic has been closed for replies.

    2 replies

    Tesla DeLorean
    Guru
    April 20, 2016
    Posted on April 20, 2016 at 03:23

    It's a dual use table for PPRE1 and PPRE2 (APB), not just the AHB, where arguably the 000/0000 case is no division.

    Perhaps they should use two table?

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    Nesrine M_O
    Associate
    April 20, 2016
    Posted on April 20, 2016 at 12:22

    Hi bonnes.uwe,

    Thank you for your feedback. The issue has been reported internally.

    -Syrine-