Hi,
Thank you all for your help and suggestions.
Finally, I am able to read correct data, and write to configuration registers of the MPU6050 module.
The only difference between my working code and earlier code is that earlier, I was trying to read WHO_AM_I byte (single byte read operation) at ...
Search found 14 matches
- Wed Jan 04, 2017 3:19 pm
- Forum: ChibiOS/HAL
- Topic: STM32F103 i2c won't work with MPU6050
- Replies: 18
- Views: 17724
- Tue Jan 03, 2017 8:35 am
- Forum: ChibiOS/HAL
- Topic: STM32F103 i2c won't work with MPU6050
- Replies: 18
- Views: 17724
Re: STM32F103 i2c won't work with MPU6050
Have you seen this : m ... S/issues/2 ?
"To get the library to function and detect the MPU6050, I had to modify the I2CdevreadBytes function to add in specific support for the STM32F103 chip as in Chibios/Hardware, you are unable to read a single byte from the I2C bus."
A similar thread was ...
"To get the library to function and detect the MPU6050, I had to modify the I2CdevreadBytes function to add in specific support for the STM32F103 chip as in Chibios/Hardware, you are unable to read a single byte from the I2C bus."
A similar thread was ...
- Mon Jan 02, 2017 9:28 pm
- Forum: ChibiOS/HAL
- Topic: STM32F103 i2c won't work with MPU6050
- Replies: 18
- Views: 17724
Re: STM32F103 i2c won't work with MPU6050
Oopss.. I should have checked before assuming.
No, all other IRQs are above 5.
No, all other IRQs are above 5.
- Mon Jan 02, 2017 9:11 pm
- Forum: ChibiOS/HAL
- Topic: STM32F103 i2c won't work with MPU6050
- Replies: 18
- Views: 17724
Re: STM32F103 i2c won't work with MPU6050
Hi
Try increasing I2C IRQ priorities above the other sources, 5 for example, and see if it makes a difference.
The IRQ priorities for both I2C1 and I2C2 were already 5. I changed it to 7. Same issue.
Some other common issues are listed in this article: m ... e_shooting
I already studied this ...
Try increasing I2C IRQ priorities above the other sources, 5 for example, and see if it makes a difference.
The IRQ priorities for both I2C1 and I2C2 were already 5. I changed it to 7. Same issue.
Some other common issues are listed in this article: m ... e_shooting
I already studied this ...
- Mon Jan 02, 2017 8:31 pm
- Forum: ChibiOS/HAL
- Topic: STM32F103 i2c won't work with MPU6050
- Replies: 18
- Views: 17724
Re: STM32F103 i2c won't work with MPU6050
Error 0 means no error.
The i2c read function in MPU6050-ChibiOS is implemented so that a successful transaction doesn't produce any log. Error is shown only if i2cMasterTransmitTimeout return a value other than MSG_OK. Since you are saying that Error 0 means no error, I understand that the ...
The i2c read function in MPU6050-ChibiOS is implemented so that a successful transaction doesn't produce any log. Error is shown only if i2cMasterTransmitTimeout return a value other than MSG_OK. Since you are saying that Error 0 means no error, I understand that the ...
- Mon Jan 02, 2017 7:12 pm
- Forum: ChibiOS/HAL
- Topic: STM32F103 i2c won't work with MPU6050
- Replies: 18
- Views: 17724
Re: STM32F103 i2c won't work with MPU6050
Earlier I tried to increase the default timeout from 4ms to 10ms. Didn't make a difference.
However, I am now able to communicate with the MPU6050 module. All I did was start the I2C driver after initializing SCL and SDA pins. Unfortunately, I am only able to make a single transaction (either read ...
However, I am now able to communicate with the MPU6050 module. All I did was start the I2C driver after initializing SCL and SDA pins. Unfortunately, I am only able to make a single transaction (either read ...
- Mon Jan 02, 2017 5:18 pm
- Forum: General Support
- Topic: Compile Cortex-M3 code on Raspberry Pi 3
- Replies: 8
- Views: 9151
Re: Compile Cortex-M3 code on Raspberry Pi 3
As a test, I compiled demos/RT-STM32F407-DISCOVERY project on rpi-3 (running headless Raspbian Lite) and my PC (AMD X4 760K @ 3.8GHz, 8GB, 2TB).
Here are the compilation times:
Rpi-3 (Running SSH only):
real 0m33.638s
user 0m29.830s
sys 0m1.910s
PC (Running 3 Vim, ~25 chromium tabs ...
Here are the compilation times:
Rpi-3 (Running SSH only):
real 0m33.638s
user 0m29.830s
sys 0m1.910s
PC (Running 3 Vim, ~25 chromium tabs ...
- Mon Jan 02, 2017 4:59 pm
- Forum: ChibiOS/HAL
- Topic: STM32F103 i2c won't work with MPU6050
- Replies: 18
- Views: 17724
Re: STM32F103 i2c won't work with MPU6050
Yes, I have already installed the required resistors.
I just skimmed through the source code of MPU6050-ChibiOS and STM32F4-ChibiOS/i2c github repositories. Both these codes use the same address for MPU6050 i.e, 0x68 (When pin AD0 is connected to GND, just like my setup).
I even created a new main ...
I just skimmed through the source code of MPU6050-ChibiOS and STM32F4-ChibiOS/i2c github repositories. Both these codes use the same address for MPU6050 i.e, 0x68 (When pin AD0 is connected to GND, just like my setup).
I even created a new main ...
- Mon Jan 02, 2017 2:08 pm
- Forum: ChibiOS/HAL
- Topic: STM32F103 i2c won't work with MPU6050
- Replies: 18
- Views: 17724
Re: STM32F103 i2c won't work with MPU6050
Check if i2c pins are set as alternate open drain.
//Activates the I2CD2 driver, PB10(SCL) and PB11(SDA) are routed to I2CD2
i2cStart(&I2CD2, &i2cfg1);
palSetPadMode(GPIOB, 10, PAL_MODE_STM32_ALTERNATE_OPENDRAIN );
palSetPadMode(GPIOB, 11, PAL_MODE_STM32_ALTERNATE_OPENDRAIN );
Try to ...
//Activates the I2CD2 driver, PB10(SCL) and PB11(SDA) are routed to I2CD2
i2cStart(&I2CD2, &i2cfg1);
palSetPadMode(GPIOB, 10, PAL_MODE_STM32_ALTERNATE_OPENDRAIN );
palSetPadMode(GPIOB, 11, PAL_MODE_STM32_ALTERNATE_OPENDRAIN );
Try to ...
- Sun Jan 01, 2017 9:38 pm
- Forum: ChibiOS/HAL
- Topic: STM32F103 i2c won't work with MPU6050
- Replies: 18
- Views: 17724
STM32F103 i2c won't work with MPU6050
I hate to open new posts, yet its been over 12 hours and I can't solve this issue.
I have an STM32F103 Minimal board. I dont know much about i2c protocol. So I copied an example from testhal/STM32/STM32F1xx. The example code configures and reads data from LIS3 accelerometer. Here is my modified code ...
I have an STM32F103 Minimal board. I dont know much about i2c protocol. So I copied an example from testhal/STM32/STM32F1xx. The example code configures and reads data from LIS3 accelerometer. Here is my modified code ...