2018-03-12 11:15 AM
I am unable to programme mpu 6050 using stm32l011f3. Can anyone help me?
I also tried programming with nucleoL011k4 board
Using mbed cli,keil and mbed cloud. But it does not work.
I am guessing the memory is not enough.
2018-03-12 11:23 AM
You mean this:
https://www.invensense.com/products/motion-tracking/6-axis/mpu-6050/
https://www.invensense.com/wp-content/uploads/2014/12/mpu-6000-family-diagram.png
As that diagram shows, you just need an I2C or SPI connection.
I am guessing the memory is not enough.
What memory, and why do you think it's insufficient?
EDIT
Invensense support:
2018-03-12 12:54 PM
I think that roughly translates to 'I took someone else's code, that I didn't write, and I don't understand, and I jammed it in some tools... and it didn't work'
My guess is that you have very little grasp of what you're doing, so helping you is going to be really difficult. Are there people around you to help you with this project?
Did the compiler/linker complain about a lack of memory?
2018-03-12 04:46 PM
I looked on mbed site, there they have a library for the device:
https://os.mbed.com/users/moklumbys/code/MPU6050/docs/9b414412b09e/classMPU6050.html
and on their forum is an application
https://os.mbed.com/forum/mbed/topic/4247/
Now, I don't know how much flash space that stm32 micro has... the code generated by mbed using Arduino libraries is huge.
Probably he can't switch the board and want a C variant of the code, something more compact that can fit...
2018-03-13 07:24 AM
You should be able to use the 6050 with that processor.
I started with this 6050 library;
https://github.com/Harinadha/STM32_MPU6050lib
I made some minor changes to it.
Mainly i converted the i2c calls from SPL to HAL.
I also added some functions to allow DMA based reads on some calls that return the typical runtime of gyro/accel values.
Using this i made a very simple app, that reads a UART stream of servo positions and modifies those control values based on the 6050 and outputs stabilized PWM on a timer.
On a F303, and uses 11K of flash.
I did it with HAL which doesn't produce the smallest code.
You have 16k of flash. It can be done. It can be done smaller than i did it.