This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TM4C123的systick时钟如何使用。

我想使用TM4C123的滴答时钟系统,但是发现找到的systick时钟的相关函数,但是我不知道计数值的对应关系

#if defined(TARGET_IS_TM4C123_RA1) || \
defined(TARGET_IS_TM4C123_RA3) || \
defined(TARGET_IS_TM4C123_RB1) || \
defined(TARGET_IS_TM4C129_RA0) || \
defined(TARGET_IS_TM4C129_RA1)
#define ROM_SysTickValueGet \
((uint32_t (*)(void))ROM_SYSTICKTABLE[0])
#endif
#if defined(TARGET_IS_TM4C123_RA1) || \
defined(TARGET_IS_TM4C123_RA3) || \
defined(TARGET_IS_TM4C123_RB1) || \
defined(TARGET_IS_TM4C129_RA0) || \
defined(TARGET_IS_TM4C129_RA1)
#define ROM_SysTickEnable \
((void (*)(void))ROM_SYSTICKTABLE[1])
#endif
#if defined(TARGET_IS_TM4C123_RA1) || \
defined(TARGET_IS_TM4C123_RA3) || \
defined(TARGET_IS_TM4C123_RB1) || \
defined(TARGET_IS_TM4C129_RA0) || \
defined(TARGET_IS_TM4C129_RA1)
#define ROM_SysTickDisable \
((void (*)(void))ROM_SYSTICKTABLE[2])
#endif
#if defined(TARGET_IS_TM4C123_RA1) || \
defined(TARGET_IS_TM4C123_RA3) || \
defined(TARGET_IS_TM4C123_RB1) || \
defined(TARGET_IS_TM4C129_RA0) || \
defined(TARGET_IS_TM4C129_RA1)
#define ROM_SysTickIntEnable \
((void (*)(void))ROM_SYSTICKTABLE[3])
#endif
#if defined(TARGET_IS_TM4C123_RA1) || \
defined(TARGET_IS_TM4C123_RA3) || \
defined(TARGET_IS_TM4C123_RB1) || \
defined(TARGET_IS_TM4C129_RA0) || \
defined(TARGET_IS_TM4C129_RA1)
#define ROM_SysTickIntDisable \
((void (*)(void))ROM_SYSTICKTABLE[4])
#endif
#if defined(TARGET_IS_TM4C123_RA1) || \
defined(TARGET_IS_TM4C123_RA3) || \
defined(TARGET_IS_TM4C123_RB1) || \
defined(TARGET_IS_TM4C129_RA0) || \
defined(TARGET_IS_TM4C129_RA1)
#define ROM_SysTickPeriodSet \
((void (*)(uint32_t ui32Period))ROM_SYSTICKTABLE[5])
#endif
#if defined(TARGET_IS_TM4C123_RA1) || \
defined(TARGET_IS_TM4C123_RA3) || \
defined(TARGET_IS_TM4C123_RB1) || \
defined(TARGET_IS_TM4C129_RA0) || \
defined(TARGET_IS_TM4C129_RA1)
#define ROM_SysTickPeriodGet \
((uint32_t (*)(void))ROM_SYSTICKTABLE[6])
#endif

例如,装载值对应的是多长时间

  • SysTickPeriodSet用这个函数进行设置了。

    Sets the period of the SysTick counter.
    Prototype:
    void
    SysTickPeriodSet(uint32_t ui32Period)
    Parameters:
    ui32Period is the number of clock ticks in each period of the SysTick counter and must be
    between 1 and 16, 777, 216, inclusive.
    Description:
    This function sets the rate at which the SysTick counter wraps, which equates to the number
    of processor clocks between interrupts.
    Note:
    Calling this function does not cause the SysTick counter to reload immediately. If an immediate
    reload is required, the NVIC_ST_CURRENT register must be written. Any write to this register
    clears the SysTick counter to 0 and causes a reload with the ui32Period supplied here on the
    next clock after SysTick is enabled.
    Returns:
    None.
  • 请问你给出的这些代码,是在哪个工程文件里面的??

  • ti\TivaWare_C_Series-2.1.0.12573\docs

    这个文件夹下面有个驱动库的文档,你可以看看。

  • 你好请问 tm4c的滴答时钟系统 你是调用的哪个h文件的函数呢