MPU9250 interrupt pin not working
XZheng0427 opened this issue · 7 comments
XZheng0427 commented
kriswiner commented
Not sure if you are using an Arduino IDE or not, looks like maybe the ST
HAL but do you not need to assign a certain pin of your MCU as interrupt
and set its mode to INPUT?
…On Wed, Apr 5, 2023 at 4:02 AM x.zheng ***@***.***> wrote:
I have to configure the interrupts in the MPU set up to be active high,
push-pull. However, I checked the oscilloscope that it is not working as
expected.
Do you have any ideas about this issue?
Many thanks.
Below screenshot is the MPU9250 init.
[image: Screenshot 2023-04-05 120029]
<https://user-images.githubusercontent.com/97288936/230061954-2931f201-c9af-4340-8c5d-0fdfd1c35dbe.png>
—
Reply to this email directly, view it on GitHub
<#488>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABTDLKXTQ3Q2OHK7VAZZ5STW7VGLLANCNFSM6AAAAAAWT5KECI>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
kriswiner commented
As far as setting the MPU9250 interrupt configuration, the two lines look
correct to me. Problem might be in the way you are te==reating the MCU pins
or fake MPU9250....
On Wed, Apr 5, 2023 at 8:58 AM Tlera Corporation ***@***.***>
wrote:
… Not sure if you are using an Arduino IDE or not, looks like maybe the ST
HAL but do you not need to assign a certain pin of your MCU as interrupt
and set its mode to INPUT?
On Wed, Apr 5, 2023 at 4:02 AM x.zheng ***@***.***> wrote:
> I have to configure the interrupts in the MPU set up to be active high,
> push-pull. However, I checked the oscilloscope that it is not working as
> expected.
>
> Do you have any ideas about this issue?
> Many thanks.
>
> Below screenshot is the MPU9250 init.
>
> [image: Screenshot 2023-04-05 120029]
> <https://user-images.githubusercontent.com/97288936/230061954-2931f201-c9af-4340-8c5d-0fdfd1c35dbe.png>
>
> —
> Reply to this email directly, view it on GitHub
> <#488>, or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ABTDLKXTQ3Q2OHK7VAZZ5STW7VGLLANCNFSM6AAAAAAWT5KECI>
> .
> You are receiving this because you are subscribed to this thread.Message
> ID: ***@***.***>
>
XZhengLboro commented
XZhengLboro commented
kriswiner commented
Usually, to get the MPU9250 to enable the interrupt, just those two
register writes to INT_CFG and INT_EN are required. This is what I do:
writeByte(MPUnum, INT_PIN_CFG, 0x10); // INT is 50 microsecond pulse and *any
read to clear*
writeByte(MPUnum, INT_ENABLE, 0x01); // Enable data ready (bit 0) interrupt
So if you do not select "any read to clear" you will have to manually clear
the interrupt, this is probably why it is not working. Check the data sheet
what 0x22 is selecting....you might be latching the interrupt or who knows
what...
…On Wed, Apr 5, 2023 at 9:17 AM x.zheng ***@***.***> wrote:
Hi Kriswiner,
I used the STM32H7 to connect the MPU9250.
I used the oscilloscope to check the MPU9250 INT pin, no high level output.
Also, I configured the GPIO of STM32H7 as GPIO_MODE_IT_RISING, and I
checked the GPIO EXIT interrupt that is work. Please see the below figure.
[image: image]
<https://user-images.githubusercontent.com/97288936/230141061-89b18c36-c7a8-4316-b998-22bb44b411d3.png>
Many thanks
—
Reply to this email directly, view it on GitHub
<#488 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABTDLKRIA43Z6KUVVXLGNQTW7WLJZANCNFSM6AAAAAAWT5KECI>
.
You are receiving this because you commented.Message ID:
***@***.***>
XZhengLboro commented
According to your configuration, I tried that.
The interrupt pin is working.
Appreciate your help.
Many thanks
kriswiner commented
Glad I could help.
…On Wed, Apr 5, 2023 at 10:56 AM x.zheng ***@***.***> wrote:
According to your configuration, I tried that.
The interrupt pin is working.
Appreciate your help.
Many thanks
—
Reply to this email directly, view it on GitHub
<#488 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABTDLKRECP36LTK4FYIONITW7WW3ZANCNFSM6AAAAAAWT5KECI>
.
You are receiving this because you commented.Message ID:
***@***.***>