cancel
Showing results for 
Search instead for 
Did you mean: 

Bad APBAHBPrescTable

Uwe Bonnes
Principal II
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};

2 REPLIES 2
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 Up vote any posts that you find helpful, it shows what's working..
Nesrine M_O
Lead II
Posted on April 20, 2016 at 12:22

Hi bonnes.uwe,

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

-Syrine-