Files
TC264_Library_seekfree/Example/Printf_Demo/USER/Cpu0_Main.c
SeekFree 927bc420c1 V1.2.8
总钻风底层增加PCLK_MODE获取参数位
        例程增加等待的信号量
2022-03-24 17:54:42 +08:00

50 lines
1.5 KiB
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*********************************************************************************************************************
* COPYRIGHT NOTICE
* Copyright (c) 2020,逐飞科技
* All rights reserved.
* 技术讨论QQ群三群824575535
*
* 以下所有内容版权均属逐飞科技所有,未经允许不得用于商业用途,
* 欢迎各位使用并传播本程序,修改内容时必须保留逐飞科技的版权声明。
*
* @file main
* @company 成都逐飞科技有限公司
* @author 逐飞科技(QQ3184284598)
* @version 查看doc内version文件 版本说明
* @Software ADS v1.2.2
* @Target core TC264D
* @Taobao https://seekfree.taobao.com/
* @date 2020-3-23
********************************************************************************************************************/
#include "headfile.h"
#pragma section all "cpu0_dsram"
uint16 num;
int core0_main(void)
{
disableInterrupts();
get_clk();//获取时钟频率 务必保留
//用户在此处调用各种初始化函数等
printf("printf demo\n");
IfxCpu_emitEvent(&g_cpuSyncEvent);
IfxCpu_waitEvent(&g_cpuSyncEvent, 0xFFFF);
enableInterrupts();
while (TRUE)
{
num++;
printf("printf num :%d\n", num);
systick_delay_ms(STM0, 100);
//注意事项1 printf打印的数据会通过串口发送出去
//注意事项2 printf所使用的串口和波特率可以在TC264_config.h文件中修改
//注意事项3 printf所使用的串口默认在get_clk函数中进行了初始化如果不想使用printf则可以在TC264_config.h文件中将PRINTF_ENABLE宏定义设置为0即可
}
}
#pragma section all restore