在线咨询
eetop公众号 创芯大讲堂 创芯人才网
切换到宽版

EETOP 创芯网论坛 (原名:电子顶级开发网)

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
查看: 8649|回复: 2

[原创] 求救! 用定时器计数,在bios中用LOG_printf在message log中显示的问题

[复制链接]
发表于 2009-7-19 09:41:50 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

x
本帖最后由 cjsb37 于 2013-4-29 09:06 编辑

为什么在message log中输出只有几行信息呢?后面的就输不出来了,这是怎么回事?
还请各位前辈给指点一下!万分火急!
这是我的定时程序:
#include <std.h>
#include <log.h>
#include <tsk.h>  
#include <sem.h>   
#include <gio.h>
#include <csl.h>
#include <csl_emifa.h>
#include <csl_timer.h>
#include <csl_irq.h>
#include <csl_chip.h>
#include <csl_gpio.h>
#include <csl_dat.h>
#include <csl_cache.h>
#include <fvid.h>
#include <edc.h>

#include "appData.h"
#include "scom.h"
#include "seeddm642.h"
#include "Tcpip_loopbackcfg.h"
static TIMER_Handle hTimer1;

static Uint32 TimerEventId;

static int cnt = 0;  
main()
{
              TIMER_Config myTimConfig;
        CSL_init();
  /*.................网络通信部分........................................*/
    CACHE_enableCaching(CACHE_EMIFA_CE00);
    CACHE_enableCaching(CACHE_EMIFA_CE01);
    DAT_open(DAT_CHAANY, DAT_PRI_LOW, DAT_OPEN_2D);
   
    SCOM_init();
   
    CACHE_setL2Queue(0x3, 0x7);
    CACHE_setL2Queue(0x1, 0x7);
    CACHE_setPriL2Req(CACHE_L2PRIHIGH);
    // create all SCOM and message objects                  
    SCOM_create("NETOK", NULL);
  /*..............................定时器部分..............................*/
        hTimer1 = TIMER_open(TIMER_DEV1, 0);
        TimerEventId = TIMER_getEventId(hTimer1);
        IRQ_globalDisable();
                IRQ_nmiDisable();
        IRQ_globalEnable();
        IRQ_nmiEnable();
        IRQ_map(TimerEventId, 15);
        IRQ_reset(TimerEventId);
        myTimConfig.cnt = 0x0;
        myTimConfig.ctl = 0x305;
        myTimConfig.prd = 0x00124f8;//1ms定时,即每1ms,cnt计数增1
        TIMER_config(hTimer1, &myTimConfig);
        IRQ_enable(TimerEventId);
        TIMER_start(hTimer1);
}
void CLK_cnt()
{
   cnt++;
   LOG_printf(&trace,"cnt VAL is %d\n", cnt);
}

在message log里输出的结果:
0   cnt VAL is 1

1   cnt VAL is 2

2   cnt VAL is 3        为什么只能输出这三行呢?下面的就输不出来了,这是怎么回事?

[ 本帖最后由 redgalaxy 于 2009-7-19 09:43 编辑 ]





发表于 2009-8-8 10:29:44 | 显示全部楼层
我没有看程序,但是我想提醒一下LOG_printf()有一项设置,它决定保留前面的消息还是保留最后的消息
发表于 2009-8-8 13:30:37 | 显示全部楼层
可能是缓冲设置得不对
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

站长推荐 上一条 /1 下一条

小黑屋| 手机版| 关于我们| 联系我们| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2025-2-2 04:40 , Processed in 0.018249 second(s), 9 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
快速回复 返回顶部 返回列表