55 lines
709 B
C
55 lines
709 B
C
|
|
#include "main.h"
|
|
|
|
#include "pt_ext.h"
|
|
#include "pt_task.h"
|
|
#include <stdlib.h>
|
|
#include <math.h>
|
|
|
|
#include "hdl_clk.h"
|
|
|
|
/*******************************************************************************
|
|
* ÖжϷþÎñº¯Êý
|
|
******************************************************************************/
|
|
void SysTick_Handler(void)
|
|
{
|
|
pt_ticks_inc();
|
|
|
|
__DSB();
|
|
}
|
|
|
|
|
|
|
|
void JDI_Disable(void)
|
|
{
|
|
GPIO_REG_Unlock();
|
|
GPIO_SetDebugPort( GPIO_PIN_TRST,DISABLE);
|
|
GPIO_SetDebugPort( GPIO_PIN_TDO, DISABLE);
|
|
GPIO_REG_Lock();
|
|
}
|
|
|
|
int32_t main(void)
|
|
{
|
|
|
|
JDI_Disable();
|
|
|
|
hdl_clk_init();
|
|
|
|
while (1)
|
|
{
|
|
SWDT_FeedDog();
|
|
|
|
pt_task_schedule();
|
|
|
|
pt_task_pm();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|