GTM 如何使用?

#include "r_gtm.h"

#include "r_rspi.h"

FSP_HEADER

/** GTM Timer Instance */

extern const timer_instance_t g_timer0;

/** Access the GTM instance using these structures when calling API functions directly (::p_api is not used). */

extern gtm_instance_ctrl_t g_timer0_ctrl;

extern const timer_cfg_t g_timer0_cfg;

#ifndef Timer_1S_callback

void Timer_1S_callback(timer_callback_args_t *p_args);

#endif

在 e2 开发环境中定义了 GTM 定时器,如何让定时中断工作?

#include "User_program_thread.h"

#include "FreeRTOS.h"
#include "openamp/open_amp.h"
#include "platform_info.h"
#include "rsc_table.h"


void Timer_1S_callback(timer_callback_args_t *p_args)
{
LPRINTF("Timer_1S is running--- \n");
}

/* User program Thread entry function */
/* pvParameters contains TaskHandle_t */
void User_program_thread_entry(void *pvParameters) {
FSP_PARAMETER_NOT_USED(pvParameters);

LPRINTF("User Program is running--- \n");

/* TODO: add your own code here */
while (1)
{

vTaskDelay(1);
}


}

在上述程序中定时中断未被执行,没在串口终端打印出内容。