Benjamin Kirsch(deleted)
|
Beaglebone Black i2c BSP 6.6
|
Benjamin Kirsch(deleted)
10/24/2014 8:34 AM
post112142
|
Beaglebone Black i2c BSP 6.6
Hallo,
I am trying to get the i2c 1 or 2 at the pinout to communicate with some other devices. But so far unsuccessfully. 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.
What am I missing? Am I doing it all wrong?
Any help is apreciated much.
Sincerely
Benjamin
|
|
|