IMU6050 to psoc 5lp problem

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.
roge_4738861
Level 1
Level 1
First reply posted First question asked Welcome!

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
1 Solution

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
4 Replies
Len_CONSULTRON
Level 9
Level 9
Beta tester 500 solutions authored 1000 replies posted

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

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.

0 Likes

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

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

0 Likes