Set CPU_CLOCK_HZ down for BCM94343WWCD2

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hi,

I want to change the BCM94343WWCD2 EVB CPU freq (96MHz to 48 MHz)

I change the CPU_CLOCK_HZ (and some PLL paramers) in platform_config.h

  But got error msg about watchdog

it seems doesn't define the DBG_WATCHDOG_TIMEOUT_MULTIPLIER in platform_watchdog.c:

#if (CPU_CLOCK_HZ == 120000000)

    #define DBG_WATCHDOG_TIMEOUT_MULTIPLIER    (2250)

#elif (CPU_CLOCK_HZ == 100000000)

    #define DBG_WATCHDOG_TIMEOUT_MULTIPLIER    (1875)

#elif (CPU_CLOCK_HZ == 96000000)

    #define DBG_WATCHDOG_TIMEOUT_MULTIPLIER    (3600)

how should I define the DBG_WATCHDOG_TIMEOUT_MULTIPLIER with CPU_CLOCK_HZ == 48000000?

Thanks.

Randy

0 Likes
1 Solution
RaktimR_11
Moderator
Moderator
Moderator
500 replies posted 250 replies posted 100 replies posted

Hello Randy,

According to formula, the multiplier should be 1800, but you should use STM32CubeMX - STM32Cube initialization code generator - STMicroelectronics tool to check the watchdog multiplier value.

View solution in original post

5 Replies
HeCh_2137836
Level 3
Level 3
5 likes given First like received First like given

/* Set dbg_watchdog timeout to 90% of the actual watchdog timeout to ensure it break before the actual watchdog bites

     * Timeout calculation

     * - Period per TIM clock cycle : 120MHz (CPU clock) / 2 (APB1 pre-scaler) / DBG_WATCHDOG_PRESCALER = 2.5ms

     *                                DBG_WATCHDOG_PRESCALER = 24000

     * - Timeout                    : ( 0.9 * 2.5ms * 1000 ) * timeout_in_seconds

     *                                DBG_WATCHDOG_TIMEOUT_MULTIPLIER =  ( 0.9 * 2.5ms * 1000 ) = 2250

Anonymous
Not applicable

Hi Ken,

Thanks for your reply.

Do you know why the 96Mhz DBG_WATCHDOG_TIMEOUT_MULTIPLIER set to 3600?

if follow your formula, it should be 1800?

Thanks.

Randy

RaktimR_11
Moderator
Moderator
Moderator
500 replies posted 250 replies posted 100 replies posted

Hello Randy,

According to formula, the multiplier should be 1800, but you should use STM32CubeMX - STM32Cube initialization code generator - STMicroelectronics tool to check the watchdog multiplier value.

Raktim Roy wrote:

Hello Randy,

According to formula, the multiplier should be 1800

Why sdk-6.2 does not include the fix since you already point out current value is wrong?

0 Likes

Raktim Roy wrote:

Hello Randy,

According to formula, the multiplier should be 1800,

It is still *wrong* in latest sdk-6.4?

0 Likes