Hi all
I want work interface  spi on beaglebone ubuntu 14.04.03
I edit file uEnv.txt below:
#Docs: http://elinux.org/Beagleboard:U-boot_partitioning_layout_3.0

uname_r=4.1.13-ti-r36
#uuid=
#dtb=

##BeagleBone Black/Green dtb's for v4.1.x (BeagleBone White just works..)

##BeagleBone Black: HDMI (Audio/Video) disabled:
dtb=am335x-boneblack-emmc-overlay.dtb

##BeagleBone Black: eMMC disabled:
#dtb=am335x-boneblack-hdmi-overlay.dtb

##BeagleBone Black: HDMI Audio/eMMC disabled:
#dtb=am335x-boneblack-nhdmi-overlay.dtb

##BeagleBone Black: HDMI (Audio/Video)/eMMC disabled:
dtb=am335x-boneblack-overlay.dtb

##BeagleBone Black: wl1835
#dtb=am335x-boneblack-wl1835mod.dtb##BeagleBone Black: replicape
#dtb=am335x-boneblack-replicape.dtb

##BeagleBone Green: eMMC disabled
#dtb=am335x-bonegreen-overlay.dtb

cmdline=coherent_pool=1M quiet cape_universal=enable

#In the event of edid real failures, uncomment this next line:
#cmdline=coherent_pool=1M quiet cape_universal=enable 
video=HDMI-A-1:1024x768@60e

##Example v3.8.x
#cape_disable=capemgr.disable_partno=
#cape_enable=capemgr.enable_partno=

##Example v4.1.x
#cape_disable=bone_capemgr.disable_partno=
#cape_enable=bone_capemgr.enable_partno=
##Example v3.8.x
#cape_disable=capemgr.disable_partno=
#cape_enable=capemgr.enable_partno=

##Example v4.1.x
#cape_disable=bone_capemgr.disable_partno=
#cape_enable=bone_capemgr.enable_partno=
cape_disable=bone_capemgr.disable_partno=BB-SPIDEV0,BB-BONELT-HDMI,BB-BONELT-HDMIN,BB-BONE-EMMC-2G
cape_enable=bone_capemgr.enable_partno=BB-I2C1,BB-SPIDEV1
##enable Generic eMMC Flasher:
##make sure, these tools are installed: dosfstools rsync
#cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh
closse and reboot
That

*cat /sys/devices/platform/bone_capemgr/slots* 

0: PF---- -1

1: PF---- -1

2: PF---- -1

3: PF---- -1

4: P-O-L- 0 Override Board Name,00A0,Override Manuf,BB-SPIDEV1

but that run code 
BlackLib::BlackSPI mySpi4(BlackLib::SPI1_0, 8, BlackLib::SpiDefault, 
2400000);
bool isOpened4 = mySpi4.open( BlackLib::ReadWrite | BlackLib::NonBlock);
 if( !isOpened4 )
  {
        std::cout << "SPI DEVICE CAN\'T OPEN " << std::endl;
        cout<<"  value 4: " <<isOpened3;
        cout<<" \r\n "<<endl;
 }
 else
  {
        cout<<" OPEN spi 4: " <<endl;
        cout<<" value open spi:" <<isOpened2;
        cout<<" \r\n "<<endl;
}
BlackLib::BlackI2C  myI2c(BlackLib::I2C_1, 0x3b);
bool is = myI2c.open( BlackLib::ReadWrite | BlackLib::NonBlock );
  if( !is )
  {
        std::cout << "I2C DEVICE CAN\'T OPEN.;" << std::endl;

 }
 else
  {
        cout << " OPEN i2c:" << std::endl;
        cout << " value i2c:" << is;
        cout<<" \r\n "<<endl;

  }
I2C OPEN
SPI DEVICE CAN\'T OPEN
please help



-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/8e6fe700-dd42-413a-b447-23d577e6e50a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to