查看: 508|回复: 0

[求助] sct 定时

[复制链接]

该用户从未签到

105

主题

190

帖子

0

金牌会员

Rank: 6Rank: 6

积分
1367
最后登录
2024-12-31
发表于 2024-11-28 13:00:12 | 显示全部楼层 |阅读模式

示例程序如下,led是100ms闪烁一次,肉眼无法分辨
#define delay (SystemCoreClock/10)
1. Use SCT timer to generate a 100 msec toggle output @CTOUT_0
2. CTOUT_0 is linked to P0_12 (Red LED) and toggles every 100 msec)

主程序如下
int main(void)
{
  /* Enter an infinite loop, just incrementing a counter */
    volatile static int i = 0 ;

        /* Generic Initialization */
        SystemCoreClockUpdate();
        Board_Init();

        Chip_SWM_Init();                                                                /* Configure the switch matrix    */

        Chip_SWM_MovablePinAssign(SWM_SCT_OUT0_O,15);        /* configure the SWM to output CTOUT_0 to PIO0_12 */

        sct_fsm_init();                                              /* Initialize the SCT using the code generated by Red State */


    while(1)
    {
        i++ ;
        __WFI();
    }
}


我想修改成1000ms也就是1s,
#define delay (SystemCoreClock/10)   感觉就是修改这句,但是放大缩小led一直长亮

哪里不对呢

我知道答案 目前已有0人回答
回复

使用道具 举报

您需要登录后才可以回帖 注册/登录

本版积分规则

关闭

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

Archiver|手机版|小黑屋|恩智浦技术社区

GMT+8, 2025-7-29 14:34 , Processed in 0.078960 second(s), 21 queries , MemCache On.

Powered by Discuz! X3.4

Copyright © 2001-2024, Tencent Cloud.

快速回复 返回顶部 返回列表