Use Logi-bone with EMMC mounted kernel

Can anyone get me started on how to modify the logi-loader so that it can be used while the kernel is mounted from eMMC? For our research application, mounting from the SD card isn't a wise design option from both robustness and R/W speed aspects. 


Tagged:

Comments

  • Hi,

    what version of the logibone do you have ? With a eMMC mounted kernel, you need to de-activate the GPMC. The easiest version to do this, is to disable auto-loading of the logi-bone cape by erasing its cape eeprom :

    sudo i2cset -y 1 0x24 0x03 0xBF # only for logi-bone R1.1
    sudo i2cset -y 1 0x24 0x01 0x00 # only for logi-bone R1.1
    cat /dev/null > /sys/bus/i2c/drivers/at24/1-0054/eeprom

    this will prevent the loading of the cape and thus the configuration of the GPMC.
    Second setp is to enable SPI 1.0 and i2C-1. The way to do this depends on your kernel version.

    With i2C and SPI activated, the loader should work fine. You just need to make sure that your FPGA design will leav the GPMC pins floating to not interfer with the eMMC.

    Regards,

    Jonathan Piat
    jamorton
  • Thanks Jonathan!

    Our development logi-bones are all R1.5.1.

    The other issue we are having (which I though was attributable to the GPMC/ eMMC conflict) was that we get the write error to ../at24/1-0054 (non-existant directory) when trying to run the install_logibone.sh script.

    At this point, we are just trying to get something to work so we are flexible on the kernel version. In a perfect work, I'd like to use a 4.x kernel but we can live with a 3.8+ revision. Seems like the changes made to the dtc in 4.x vs. 3.8/ 3.14 are going to be problematic with the logi-bone... correct? Our research team does some really neat acoustic processing using an FPGA core we developed so we are excited to get that onto the logi and talking to the IoT infrastructure via the BBB. 

    Thanks for the support!

    -James
  • I'am a bit into acoustic these days myself. What are you working on ?

    You can work with whatever kernel you want as the problem we have with 4.X is related to GPMC (and you won't want GPMC).The only thing is that i don't know how to activate SPI and I2C for 4.X kernel but i guess that the beaglebone community knows how to do this.

     Can you list the entries in "/sys/bus/i2c/drivers/at24" on your beaglebone ? This is not a problem for you as you don't want the cape EEPROM to be initialized to to load SPI, I2C and not GPMC.
  • Here is the listing for the i2c bus.

    ubuntu@arm:/sys/bus/i2c/drivers/at24$ ls
    0-0050  2-0054  2-0055  2-0056  2-0057  bind  uevent  unbind


    This is running on kernel flashed to eMMC taken from https://rcn-ee.com/rootfs/2015-08-17/flasher/BBB-eMMC-flasher-ubuntu-14.04.3-console-armhf-2015-08-17-2gb.img.xz. I also noticed that another issue is the /dev contents lack the logi_mem interface. 
  • Logi_mem is the memory mapped GPMC interface so you don't need it. You only need to have spidev1.0 ans i2c-1 un /dev for the loader to work.
  • Okay. Thanks for your patience with me and the details. 

    So it sounds like the real issue is determining why i2c-1 isn't showing up on any of the various kernels I have tried. What is your understanding of this problem and the solution?


  • @jpiat I still haven't made a lot of progress on the issues in this feed.

    I did finally find an eMMC loaded kernel that would sort of work with the logi-bone however I have been having to manually compile SPI dto's for it. 

    However, my logi-bone has had its eeprom previously programmed and I don't think your previous suggestion of issuing
    cat /dev/null > /sys/bus/i2c/drivers/at24/1-0054/eeprom 
    is doing anything:
    1. If I plug in the Logi-bone before turning on the BBB, user LED0 (on the BBB) starts blinking with the double strobe heartbeat and LED2 starts flashing rapidly. The board never comes up which makes me suspect a GPMC/ eMMC conflict.
    2. If I hot-plug the Logi-bone, it will run the blink_led test app, however I am guessing that the blink_led HDL doesn't leave the GPMC pins in high-Z because the board eventually crashes all on its own with blink_led running.

    Can you please explain the procedure to keep the Logi-bone from trying to load a dto on boot or whatever is causing it to halt the eMMC boot process?
  • I solved this problem in :

    http://valentfx.com/vanilla/discussion/comment/721#Comment_721

    The heart-beat happening at boot on the logi-bone is because you must have enabled a script to auto-load the logibone at boot time (this is not part of our distribution). The part 2 of your problem is solved in the referred post. When synthesizing your project you must  tell ISE to let unused pins floating :

    right click on "Generate Programming File"  in the process window -> process properties -> Configuration Options -> Unused Pins -> Floating.

    I had the same problem and the bitstream would crash the running kernel as the eMMC could not be accessed anymore.

    For the auto load of the cape, can you check what is in your /boot/uEnv.txt ? There might be a line enabling the cape by default.
  • To make sure you have erased your eeprom you can do a :

     sudo sh -c "echo "ABCDEFGHIJKL" > /sys/bus/i2c/drivers/at24/1-0054/eeprom"

    and then :

    cat /sys/bus/i2c/drivers/at24/1-0054/eeprom | more

    to observe the first bytes of the EEPROM.
  • Thanks for this information. I will reply with confirmation of the solution. 

    On the side: User Kumar and I have desks about a meter apart so we are collaborating and making best use of your help! I also forgot to tell you about what we are doing with the Logibone- We are using them to capture data from a digital microphone to autonomously detect and analyze acoustic events of specific types in situ. We will eventually be adding a GPS receiver to the Logi-bone as well and capturing several different NMEA messages. 

    Thanks.
    -James

  • I'am using the logipi to capture data from PDM microphones (MP45DT02) and it works like a charm ! Are you running any kind of classification to detect the events ? About GPS, i have a component in logi-hard to select NMEA messages from a NMEA stream.

    The solution i provides works with the default image loaded in the eMMC (3.8.13bone71.1) of my beaglebone. I got the SPI working at 48MHz, but surprisingly the speed is not great (~1.5MB/s). There are beaglebone users complaining about the SPI speed. It seems that there is a great delay between each byte transfer. The raspberry-pi does a better job at SPI as it has a 4KByte Fifo and can thus send/receive data continuously without inter-bytes delay.
Sign In or Register to comment.