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);
d)SETIOV(&siov,&send_str,sizeof(send_str)); // i2c_send_t send_str;
SETIOV(&siov,sendpackage, sizeof(sendpackage)); // char sendpackage;
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
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
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.