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.
You mean this: https://www.invensense.com/products/motion-tracking/6-axis/mpu-6050/
As that diagram shows, you just need an I2C or SPI connection.
What memory, and why do you think it's insufficient?
Invensense support: https://www.invensense.com/developers
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?
I looked on mbed site, there they have a library for the device:
MPU6050 | Mbed
and on their forum is an application
Measuring Angle with MPU6050 | Mbed
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...
You should be able to use the 6050 with that processor.
I started with this 6050 library;
GitHub - Harinadha/STM32_MPU6050lib: MPU6050 I2C Library for STM32f103xx family of microcontrollers
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.
Retrieving data ...