You are here

error implementing a timer | Cypress Semiconductor

error implementing a timer

Summary: 5 Replies, Latest post by Bob Marlowe on 27 Jan 2014 10:35 AM PST
Verified Answers: 0
Last post
Log in to post new comments.
raithathakishan's picture
1 post

i have used a timer 32 bit to generate a timer of 1 sec .
i have kept interrupt type as terminal count.
set vc1 to 8 ,vc2 to 3 ,cpu clock as vc2 giving me clock of 1 Mhz
i have set the period to 1000000 which means it should generate an interrupt every 1 sec.
i have given the output of terminal count to port 0_0 and connected an led to pin 0 of port 0.
the following is the code i have written

my psoc designer uses hi tech compiler

#include // part specific constants and macros
#include "PSoCAPI.h" // PSoC API definitions for all User Modules
#include "timer32.h"
void interrupt timer32_isr(void);
void main()
TIMER32_WritePeriod(0xf4240); //equivalent hex of 1000000

void interrupt timer32_isr(void) @0x00 //as i have hitech compiler so used this way instead of using pragma directive
int count=0; //i have connected port 2 pin 0 to an led so it should glow whenever an interrupt gets generated

I have added
ljmp _timer32_isr
in the file timer32int.asm at the appropriate place
these are the messages of error i get when i build the program
: 0: (500) undefined symbols: (error)
_TIMER32_EnableInt(output\timer2.obj) _TIMER32_WritePeriod(output\timer2.obj) _TIMER32_Start(output\timer2.obj) _TIMER32_WriteCompareValue(output\timer2.obj)
HI-TECH C PRO compiler averages 40% less code than this Lite mode
PRO may reduce your program size by 51 bytes

C:\PROGRA~1\CYPRES~1\PSOCDE~1\tools\make: *** [output/timer2.hex] Error 1

timer2 - 1 error(s) 0 warning(s) 05:13:52

i have referred many app notes as well as user module example projects but cant figure out whats wrong .
if any one can help??

user_14586677's picture
7646 posts

Pleistocene era post bubbling up to top of this forum, a hack going on ?


Forum index in need of rebuild ?



user_460349's picture
1362 posts

 May be the Y2038 problem come early 

user_1377889's picture
9296 posts

Just to solve: the #pragma interrupt_handler is missing...



user_14586677's picture
7646 posts

You don't use the pragma in HiTech, thats for Imagcraft.


Regards, Dana.

user_1377889's picture
9296 posts


************************************ Congratulations *************************************

for post number 3000 !!!!!!!!


Log in to post new comments.