Need help with time please

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
DaHu_285096
Level 5
Level 5
10 likes received 250 replies posted 100 replies posted

Hi,

I have a simple project that just uses a UART and Timer and several IO pins but I cannot compile as it has run out of UDB resources.

The timer just needs to prove a 1ms interrupt but I am having trouble getting it to run.

I have attached my project.

Would be good if there was a method to generate 1ms timer int with less resources.

Any help much appreciated.

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.
MotooTanaka
Level 9
Level 9
Distributor - Marubun (Japan)
First comment on blog Beta tester First comment on KBA

Hi,

> Sorry, I should have posted interim result.

That's OK, I do similar things all the time.

I saw your schematic and made a couple of modifications

(1) Reconnect ISR to interrupt pin

010-schematic.JPG

(2) Enabled the TC interrupt

011-msTimer_config.JPG

I hope with this the interrupt will be called.

BTW, if all you needed was a 1 ms periodical interrupt timer,

you could have used "SysTick." And using it will not consume UDB resource.

Following URL is my sample using SysTick.

Measuring time interval using SysTick (CY8CKIT-059/CY8CKIT-044)

moto

View solution in original post

0 Likes
4 Replies
lock attach
Attachments are accessible only for community members.
MotooTanaka
Level 9
Level 9
Distributor - Marubun (Japan)
First comment on blog Beta tester First comment on KBA

Hi,

I just downloaded you project and duplicated the project to "Remote_Sensor_200430A".

And it could be compiled without problem.

000-compiled.JPG

Would you try "Clean and Build" your project?

And in case, you still have the problem please double check if the attached project was the same one.

moto

P.S. Attached is the project I duplicated and compiled. (now cleaned and archived)

0 Likes

Sorry, I should have posted interim result.

I changed timer from 32bit to 8 bit and it compiled

However, when I run the code I do not get any timer interrupts occurring.

I enabled global interrupts before calling the Timer init routine in timer.c

I then start the timer component and hook up the isr to msTICK_INT, but this interrupt never gets called.

0 Likes
lock attach
Attachments are accessible only for community members.
MotooTanaka
Level 9
Level 9
Distributor - Marubun (Japan)
First comment on blog Beta tester First comment on KBA

Hi,

> Sorry, I should have posted interim result.

That's OK, I do similar things all the time.

I saw your schematic and made a couple of modifications

(1) Reconnect ISR to interrupt pin

010-schematic.JPG

(2) Enabled the TC interrupt

011-msTimer_config.JPG

I hope with this the interrupt will be called.

BTW, if all you needed was a 1 ms periodical interrupt timer,

you could have used "SysTick." And using it will not consume UDB resource.

Following URL is my sample using SysTick.

Measuring time interval using SysTick (CY8CKIT-059/CY8CKIT-044)

moto

0 Likes

Thanks Motoo,

I'll take a look at systick, That is all I need, a 1ms periodic interrupt.