GTM TIMER 如何启动?
#include "User_program.h"#include "FreeRTOS.h"
#include "openamp/open_amp.h"
#include "platform_info.h"
#include "rsc_table.h"
void g_timer0_callback(timer_callback_args_t *p_args)
{
LPRINTF("g_timer0_callback is running--- \n");
}
/* User task Thread entry function */
/* pvParameters contains TaskHandle_t */
void User_program_entry(void *pvParameters) {
FSP_PARAMETER_NOT_USED(pvParameters);
/* TODO: add your own code here */
LPRINTF("User program is running--- \n");
fsp_err_t err = FSP_SUCCESS;
/* Initializes the module. */
err = R_GTM_Open(&g_timer0_ctrl, &g_timer0_cfg);
/* Handle any errors. This function should be defined by the user. */
assert(FSP_SUCCESS == err);
/* Start the timer. */
(void) R_GTM_Start(&g_timer0_ctrl);
/* (Optional) Stop the timer. */
//(void) R_GTM_Stop(&g_timer_ctrl);
while (1) {
vTaskDelay(1);
}
}
CM33 运行后 定时器中断不执行
页:
[1]