C8051F410芯片,编译成功,但是程序不允许。

在 C8051F 芯片的时候,全局变量定义的多了,出现了一个问题,就是编译成功,并且编译后的代码量在flash限制内,但是程序不允许。

后来发现问题是,全局变量太多,看门狗未关(寄存器默认未关看门狗),导致启动文件,一直在重启运行,解决办法,在启动文件里关闭看门狗。然后上面的问题就解决了。

 

类似案例:https://bbs.21ic.com/icview-2542926-1-1.html?fromuser=

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
C8051F410定时器程序 //----------------------------------------------------------------------------- // F41x_Timer0_16bitTimer.c //----------------------------------------------------------------------------- // Copyright 2006 Silicon Laboratories, Inc. // http://www.silabs.com // // Program Description: // // This program presents an example of use of the Timer0 of the C8051F41x's in // 16-bit counter/timer mode. It uses the 'F410DK as HW platform. // In this example the LED is toggled at a rate defined by the // LED_TOGGLE_RATE constant.(in milliseconds) // // The timer is set with this values and counts until an overflow when it // generates an interrupt. This interrupt reloads the timer values and toggles // the LED. // // Pinout: // // P2.1 -> LED // // all other port pins unused // // How To Test: // // 1) Open the F41x_Timer0_16bitTimer.c file in the Silicon Labs IDE. // 2) If another rate is required change LED_TOGGLE_RATE (in msec) // 3) Compile the project and download to the device. // 4) Verify the LED pins of J5 are populated on the 'F41x TB. // 5) Run the code. // 6) Check that the LED is blinking at a constant rate . // // // FID: 41X000046 // Target: C8051F41x // Tool chain: KEIL C51 7.20 / KEIL EVAL C51 // Command Line: None // // Release 1.0 // -Initial Revision (CG) // -08 Mar 2006 // //----------------------------------------------------------------------------- // Includes //----------------------------------------------------------------------------- #include // SFR declarations //----------------------------------------------------------------------------- // Global Constants //----------------------------------------------------------------------------- #define SYSCLK 24500000/8 // SYSCLK in Hz (24.5 MHz internal // oscillator / 8) // the internal oscillator has a

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值