PSOC 4 BLE and accelerometer MPU 6050

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Hello PSOC enthusiasts. I am playing with CYC8KIT 420 BLE kit and MPU 6050 accelerometer. I found a project done by Sam (http://samselectronicsprojects.blogspot.com/2014/07/getting-roll-pitch-and-yaw-from-mpu-6050.html).

   

The only change I made is that I update the files for CYC8KIT. The project should be printing accelerometer reading on TeraTerm screen. I am not able to get that except a message indicating that UART initialized.

   

Could some body have a quick look at my project and give me some insight. Thank you in advance.

   

Best,

   

Apoorva

0 Likes
1 Solution
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Keep in mind that most of the I2C APIs (except those for reading a byte) return a status byte which, when non-zero indicate an error condition. Check those at least while debugging. Increase the heap size to 0x0200 you set it to only 0x0100.

   

 

   

Bob

View solution in original post

0 Likes
6 Replies
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

Are you sure that the I2C address is the correct one? When you don't get any message after UART init probably I2C communication is stuck.

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

You did not specify the GPIO pins for I2C: must be P3_5 and P3_4, pullup resistors are internal.

   

Check with debugger where the program hangs.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Thank you so much Bob. That worked beautifully! 😄

   

Thank you to Hli too.

0 Likes
Anonymous
Not applicable

Sorry guys to confuse you. It didn't work. 😞

   

I guess I need to work more. I am working on your suggestions.

0 Likes
Anonymous
Not applicable

Bob and Hli. could you tell me if there is a memory guage in PSOC creater where I could check if the device is running out of memory. After I changed the pin, program runs go to calibration part and gets stuck. I find an error in debug that says "SWD memory error" and "The target program has stopped at: file: main.c line: 47 function: main address: 0x000002A6"
 

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Keep in mind that most of the I2C APIs (except those for reading a byte) return a status byte which, when non-zero indicate an error condition. Check those at least while debugging. Increase the heap size to 0x0200 you set it to only 0x0100.

   

 

   

Bob

0 Likes