cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 5, 3 & 1 MCU

New Contributor

hi,

I'm working on a project and my problem is that the INTERRUPT PIN is not working after a couple of seconds.

please check my project and try to find the problem please.

0 Likes
Reply
1 Solution
Valued Contributor II

I see that MU_INT has an uneven meander 8kHz

so I connected Clock_1 = 5Hz instead of IMU_INT for isr_IMU.

I changed contacts:

SCL_1 = P3_4 SDA_1 = P3_5 (for PSoC4 compatibility)

and installed drive mode a resistive pull up (no external resistors - too lazy to solder)

I2C_MPU6050 mode: = UDB, 50kbps

wire length = 15cm

MPU runs for many (tens) minutes.

I have seen several threads about a similar issue.

MPU seems to stop responding on poor connection.

A forced reset may be needed.

View solution in original post

0 Likes
Reply
4 Replies
Honored Contributor

roge,

I don't have an IMU6050 so I'm not sure I can get your program working.

However, please take this as a suggestion.   Normally interrupt handling routines should be treated as "get in and get out" as quick as you can.   This is because when in the interrupt routine, you are effectively blocking all other potential interrupts.

Your CY_ISR(imu_Handler) has two types of calls that make your interrupt processing potentially problematic if not cause the program to stop.

In CY_ISR(imu_Handler) you call:

  • SERIAL_PutString(buf) calls.   This is a blocking function.  Not a good idea to call in ISRs.
  • CyDelay().  This is a blocking function.  Your call is for 1 sec.   Not a good idea to call in ISRs.

If these calls listed above get called and blocks, other interrupts could get lost.  Therefore if you're expecting servicing interrupts every so often it might not happen reliably.

Len

Len
"Engineering is an Art. The Art of Compromise."
0 Likes
Reply
Valued Contributor II

I see that MU_INT has an uneven meander 8kHz

so I connected Clock_1 = 5Hz instead of IMU_INT for isr_IMU.

I changed contacts:

SCL_1 = P3_4 SDA_1 = P3_5 (for PSoC4 compatibility)

and installed drive mode a resistive pull up (no external resistors - too lazy to solder)

I2C_MPU6050 mode: = UDB, 50kbps

wire length = 15cm

MPU runs for many (tens) minutes.

I have seen several threads about a similar issue.

MPU seems to stop responding on poor connection.

A forced reset may be needed.

View solution in original post

0 Likes
Reply
Honored Contributor

Evgeniy,

Is it the PSoC which is not responding or the I2C_MPU6050?

Len

Len
"Engineering is an Art. The Art of Compromise."
0 Likes
Reply
Valued Contributor II

if PSoC did not receive a response, it stops polling6050.png

0 Likes
Reply