在线时间227 小时
UID261364
注册时间2020-5-12
NXP金币0
该用户从未签到
金牌会员
 
- 积分
- 1367
- 最后登录
- 2024-12-31
|
示例程序如下,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一直长亮
哪里不对呢
|
|