cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 4 MCU

DaHu_285096
Contributor II

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
MotooTanaka
Esteemed Contributor

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
MotooTanaka
Esteemed Contributor

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
DaHu_285096
Contributor II

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
MotooTanaka
Esteemed Contributor

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
DaHu_285096
Contributor II

Thanks Motoo,

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