1243 views|0 replies

3836

Posts

19

Resources
The OP
 

DM642 interrupt timer [Copy link]

TIMER_Handle TimerHandle0;void timer1(){//////////////////////////////////////////////////////////// TimerHandle0 = TIMER_open(TIMER_DEV0 , TIMER_OPEN_RESET); IRQ_setVecs(vectors); IRQ_globalEnable(); IRQ_isEnable(); //Map TIMER events to physical interrupt number IRQ_map(IRQ_EVT_TINT0, 14); //Reset the timer events IRQ_reset(IRQ_EVT_TINT0); TIMER_configArgs(TimerHandle0, 0x000002c0,/*ctl*/ 0x11e1a300,/*prd*/ //10ms-0x000b71b0 with 300 blocks, 30ms-0x00225510 0x00000000/*cnt*/ ); IRQ_enable(IRQ_EVT_TINT0); interrupt void timer0_isr(){ // cnt_timer=(cnt_timer+1)%9; //////////Unloaded configuration///////////////////////////// IRQ_clear(IRQ_EVT_TINT0); IRQ_enable(IRQ_EVT_TINT0);} .global _timer0_isr _vector14: VEC_ENTRY _timer0_isr

This post is from Microcontroller MCU
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews

Room 1530, Zhongguancun MOOC Times Building, Block B, 18 Zhongguancun Street, Haidian District, Beijing 100190, China Tel:(010)82350740 Postcode:100190

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list