PDL v2.x vbat.h Defines Wrong VBOOST Values - KBA225144

Version 7

    Author: JamesT_21      Version: **


    Translation - Japanese: PDL v2.x vbat.hが間違ったVBOOST値を定義する - KBA225144 - Community Translated (JA)



    When I use particular defines for VBOOST values, I get unexpected results. Is there a workaround for this issue?



    The VBOOST constants are used to configure the clock boost time for the battery domain on FM parts. These constants are defined in vbat.h.

    typedef enum en_clk_boost_time


        ClkBoost50ms  = 0u,    ///< Boost time 50 ms (initial value)

        ClkBoost63ms  = 1u,    ///< Boost time 62.5 ms

        ClkBoost125ms = 2u,    ///< Boost time 125 ms

        ClkBoost250ms = 3u     ///< Boost time 250 ms

    } en_clk_boost_time_t;


    These constants are used in vbat.c, and in several code examples There are two problems with this code.


    First, there is no 50 ms boost, but there is a 500 ms boost. Other boost options are available.


    However, the second problem is that the defined values are incorrect. Each value is off by one. The documentation also reflects this error. For example, the description of en_clk_boost_time_t is based on the code shown above.



    To set the correct boost time, use these constants in the configuration structure for a call to Vbat_Init().


    To get

    Use this Constant

    62.5 ms


    125 ms


    250 ms


    500 ms