Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Beaglebone Black i2c BSP 6.6: (4 Items)
   
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
Re: Beaglebone Black i2c BSP 6.6  
After checking it with Angstroem Linux and i2cdetect() function I found a wiring problem and some packet declaration 
wich was not right. Now its working. would be niche if qnx would also offer some function like i2c detect....

Benjamin
Re: Beaglebone Black i2c BSP 6.6  
Hi Benjamin,

I am also having the same problem. But I am able run my device on linux with i2cdetect able to detect it. So I assume 
there is no wiring issues.

Could you also post what was the modification made on the "some packet declaration "

Regards,
Anson
Re: Beaglebone Black i2c BSP 6.6  
Realised that the modification to BSP drivers where not taking place (pinmux settings) until I came across this page. [
https://refreshless.com/blog/qnx-6.6-on-the-beaglebone-black/]

Quoting from the website, credits to Léon Gersen 

To get the build process to use the actual code from the \src folder, we needed to change the Makefile to use the 
install directive in the build, not hinstall. Browse to:

\Makefile
And find the install directive:

install: $(if $(wildcard prebuilt/*),prebuilt)
	$(MAKE) -Csrc hinstall
	$(MAKE) -Csrc
Change $(MAKE) -Csrc hinstall to $(MAKE) -Csrc install (removing just the one 'h'). 'Clean' your project and build it 
again: it will now use the code from the \src folder.