Skip navigation.
Home
The QNX Community Portal

View topic - i2c on Beaglebone Black

i2c on Beaglebone Black

Discussion about the QNX6 OS.

i2c on Beaglebone Black

Postby ABSOLUT » Fri Oct 31, 2014 12:10 pm

Hallo all,
I am trying for a while now to get the i2c1 or i2c2 of my beaglebone black to communicate with some other devices (Brushless Controller of a Hexacopter).
I have put an oscilloscope at the ends of the SCL and SDA line of the i2c pinout to test weather or not I am getting a signal. Here is what I did so far:

1.) uncomment i2c 1 and 2 in the build script
2.) add the init_i2c1_pin_mux() and the init_i2c2_pin_mux() functions to the init_pinmux() to activate the pins. ->build

3.) write a program to communicate with my devices using the i2c framework functions of qnx including:
a) i2c0_handle = open("/dev/i2c2", O_RDWR);
b)devctl(i2c0_handle, DCMD_I2C_DRIVER_INFO, &i2c_dev_info,sizeof(i2c_driver_info_t),NULL);
c)devctl(i2c0_handle,DCMD_I2C_SET_BUS_SPEED,&speed_mode,sizeof(speed_mode),NULL);
d)SETIOV(&siov[0],&send_str,sizeof(send_str)); // i2c_send_t send_str;
SETIOV(&siov[1],sendpackage, sizeof(sendpackage)); // char sendpackage[2];
e)devctlv(i2c0_handle,DCMD_I2C_SEND,2,0,siov,NULL,NULL);
f) #include <hw/i2c.h>
g) link i2c-master library from the bsp statically to the project

When I start I get the following error: omap_i2c_wait_status: PID_8 Connection timed out (260), dev->status 0, stat reg
0
and concering the set speed: i2c-omap35xx: Invalid bus speed(1)
Furthermore the I2C_DRIVER_INFO has some strange values for speed and address (3) (3) which are not defined in the i2c
framework.
No output is visible at the osciloscope yet.

What am I missing? Do I have to activate i2c device first? Has someone of you already succeded in using the i2c of the beaglebone Black and can maybe help me?
Any help is very much apreciated.

Benjamin
ABSOLUT
New Member
 
Posts: 2
Joined: Tue Oct 21, 2014 1:10 pm

Re: i2c on Beaglebone Black

Postby ABSOLUT » Fri Nov 07, 2014 10:11 am

Tested it now with Angstroem Linux and i2cdetect() functions and could this way find out, that I had some wiring issues and some false declared packets wich I wanted to send. Its now working the way I intended.
Benjamin
ABSOLUT
New Member
 
Posts: 2
Joined: Tue Oct 21, 2014 1:10 pm


Return to QNX6 - OS

Who is online

Users browsing this forum: No registered users and 4 guests