cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC™ Creator & Designer

Anonymous
Not applicable

Hi, The interrupt in my project which is originally used to enable the timer is conflicting with the SPIM. The issue now with my project is that when I quoted the "CyGlobalIntEnable" and the "TimerISR_StartEx(InterruptHandler1)", only the SPIM has out put, and when these two are not quoted, only the timer has out put. Here is a zip file and some screenshot of my project, Just wondering if anyone would help me solve this issue. thanks! Capture 2.PNGCapture1.PNGCapture3.PNG

0 Likes
1 Solution
Bob_Marlowe
Expert II

"enable the interrupt to timer alone instead of using the global interrupt enabler?"

This is definitively not the cause for your issue. The global interrupt enable is needed to fire any interrupt.

More:

  • Set the timer interrupt priority to the lowest (7) value.
  • Reduce the timer clock, so that you get 500µs period. When that works (and it should) you may increase the clock frequency.
  • Use the Timer_1_ReadStatusRegister() API and not the access to the register itself, this could get optimized-out.

Bob

View solution in original post

12 Replies
Bob_Marlowe
Expert II

Can you please post your complete project so that we all can have a look at all of your settings. To do so, use

Creator->File->Create Workspace Bundle (minimal)

and attach the resulting file.

Bob

0 Likes
Anonymous
Not applicable

Hi

Here is the file of the complete project

0 Likes
Bob_Marlowe
Expert II

Cannot open your project, something is wrong with it. Did you follow my instructions? Why are there two .zip files??

Try to

Archive your project Try using other options instead of "minimal"

Expand the archive into a new folder

Open the new project

When that works attach the archive.

Bob

0 Likes
Anonymous
Not applicable

Hi

Hope the attached file would work this time, thanks for helping

0 Likes
Bob_Marlowe
Expert II

I changed

Clock speed to 60MHz

I/O pin

Made changes in the program

The 2µs interrupt gives the CPU only few time, consider to decrease the frequency.

Result untested, give it a try. Are you using a CY8CKit-050LP Development Kit?

Bob

0 Likes
Anonymous
Not applicable

Yes I am using the CY8CKIT-050Lseries kit and had tried your suggested modifications, seems it is not working, I still can't display both signals.

0 Likes
Bob_Marlowe
Expert II

increase (for testng) the timer interrupt period from 2µs to 200µs.

Did you change the timer intr priority as I did?

Bob

0 Likes
Anonymous
Not applicable

Hi

I set the TimerISR to top priority and have modified the top design using the max interrupt time period possible and it still doesn't seem working. I am now sure it is the interrupt function defining and the enabling process that are conflict with the SPIM process, is there any way the resolve the conflict for example enable the interrupt to timer alone instead of using the global interrupt enabler? Thanks for your patience!

0 Likes
Bob_Marlowe
Expert II

"enable the interrupt to timer alone instead of using the global interrupt enabler?"

This is definitively not the cause for your issue. The global interrupt enable is needed to fire any interrupt.

More:

  • Set the timer interrupt priority to the lowest (7) value.
  • Reduce the timer clock, so that you get 500µs period. When that works (and it should) you may increase the clock frequency.
  • Use the Timer_1_ReadStatusRegister() API and not the access to the register itself, this could get optimized-out.

Bob

View solution in original post

Anonymous
Not applicable

Hi

I have tried to include those modifications but nothing changes, I suspect the timer interrupt and the Timer_StartEx() together may have blocked the operation of the for(;;) loop. 

0 Likes
Bob_Marlowe
Expert II

Can you please resend the latest project with t6he modifications.

Bob

0 Likes
Anonymous
Not applicable

Hi,

Made a few modifications for the pin and timer settings afterwards,the SPIM is now working with the Timer interrupt Thanks a lot for your helping and patience!

0 Likes