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

PSoC™ 5, 3 & 1 Forum Discussions

JoSc_4496551
Level 1
Level 1
First like received

I send info thru a UART and I see that the program stays in Main. I think the timer is not running. I have attached a bundle.

thanks for any advice.

0 Likes
1 Solution
MotooTanaka
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted

Hi,

I saw your project.

To enable the ISR you need to call

isr_GetCounts_StartEx(isr_GetCounts_Handler) ;

So I did

(1) Changed the CY_ISR_PROTO

from

CY_ISR_PROTO(isrGetCounts);

to

CY_ISR_PROTO(isr_GetCounts_Handler);

(2) added a couple of lines

    /* Place your initialization/startup code here (e.g. MyInst_Start()) */

    Counter_1_Start();

    Counter_2_Start();

    isr_GetCounts_ClearPending() ;                               // <=====

    isr_GetCounts_StartEx(isr_GetCounts_Handler) ;   // <=====

    MeasTime_Start();    // it calls timer_init

    MeasTime_Enable();

    MeasTime_Start();

    UART_1_Start();

Then your project worked like below

001-TeraTerm-log.JPG

Attached is your project with my modification(s).

moto

View solution in original post

0 Likes
2 Replies
MotooTanaka
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted

Hi,

I saw your project.

To enable the ISR you need to call

isr_GetCounts_StartEx(isr_GetCounts_Handler) ;

So I did

(1) Changed the CY_ISR_PROTO

from

CY_ISR_PROTO(isrGetCounts);

to

CY_ISR_PROTO(isr_GetCounts_Handler);

(2) added a couple of lines

    /* Place your initialization/startup code here (e.g. MyInst_Start()) */

    Counter_1_Start();

    Counter_2_Start();

    isr_GetCounts_ClearPending() ;                               // <=====

    isr_GetCounts_StartEx(isr_GetCounts_Handler) ;   // <=====

    MeasTime_Start();    // it calls timer_init

    MeasTime_Enable();

    MeasTime_Start();

    UART_1_Start();

Then your project worked like below

001-TeraTerm-log.JPG

Attached is your project with my modification(s).

moto

0 Likes

Moto,

Thank you, that did the trick. I will study your changes so that I get it

right next time.

I consider this answered, but I could not find a button for that.

John

On Mon, Dec 21, 2020 at 6:47 PM Motoo Tanaka <community-manager@cypress.com>