- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Solved! Go to Solution.
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
"Engineering is an Art. The Art of Compromise."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Evgeniy,
Is it the PSoC which is not responding or the I2C_MPU6050?
Len
"Engineering is an Art. The Art of Compromise."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
if PSoC did not receive a response, it stops polling