Code Monkey home page Code Monkey logo

bbb-mikrobus-cape's People

Contributors

mikroe avatar qqtyin avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

stahta01

bbb-mikrobus-cape's Issues

Connecting mikroE Click Boards/mikroBus Cape with a BeagleBone Black help wanted

TL;DR: How to access a mikroE click module via SPI using a BeagleBone Black and a mikroBus Cape?

Hello,
I'm currently trying to connect my BeagleBone Black Rev C with the mikroBus Cape (PID: MIKROE-1857). Furthermore, I want to get access to a MRAM click module (https://www.mikroe.com/mram-click) by connecting it with the mikroBus Cape. My BBB is running the latest Debian image (AM3358 Debian 10.3 2020-04-06 4GB SD IoT) and with uname_r=4.14.108-ti-r141.

Firstly, I tried to work with U-Boot overlays:

I followed the instructions on https://elinux.org/Tigal:BeagleBone_mikrobuscape but used the updated url "https://github.com/mikroe/BBB-mikroBUS-Cape". But, after setting the "uboot_overlay_addr0=/lib/firmware/BB-MIKROBUS-01-00A1.dtbo" in the uEnv.txt the board would not boot.

I followed the instructions on "https://github.com/beagleboard/bb.org-overlays/" and I also upgraded my bootloader (https://elinux.org/Beagleboard:BeagleBoneBlack_Debian#U-Boot_Overlays). After setting all four BB-MIKROBUS-CAPE-X.dtbo files in "uboot_overlay_addrY=..." the board booted. (It also boots when only one is enabled)

Next I wanted to get access to the click module on the mikroBus Cape.

A.
I downloaded the mikroSDK 2.0 (https://www.mikroe.com/mikrosdk) on the BBB, but I couldn't find nor create the correct board.h file to get it running. After stumbling upon "NectoStudio" I could only find support for generic ARM boards which are from the STM32 family, which the BBB Rev C is not. (Getting access to the mikroSDK 2.0 would allow the usage of scripts via https://libstock.mikroe.com/ which would open up many other possibilities)

As I couldn't get the mikroSDK 2.0 working, I tried to get direct access via SPI to the click module. For that I put the click module on the mikroBus Cape slot 3 (CS - Pin 17, D1/MISO - Pin 21, D0/MOSI - Pin 18 and CLK - Pin 22).

B.
After some research I found the iobb library and followed its instructions (https://www.element14.com/community/community/designcenter/single-board-computers/next-genbeaglebone/blog/2019/08/15/beaglebone-black-bbb-io-gpio-spi-and-i2c-library-for-c-2019-edition). After installation, I tried to run the example SPI code without any changes (so not using option 2.) and it runs error-free. But when I enable the BB-MIKROBUS-CAPE-3.dtbo I always get "ERROR: open() for /sys/devices/platform/ocp/ocp:P9_17_pinmux/state failed, No such file or directory"
So, after some investigation I realised that BB-MIKROBUS-CAPE-3.dtbo sets "P9_X_pinmux { status = "disabled"; };" for X = {18,19,21,22} and doesn't enable spi in its pinctrl-section, which could be the cause for the problem.

So I tried two things:

  • I just used BB-MIKROBUS-CAPE-2.dtbo which doesn't set "P9_X_pinmux { status = "disabled"; };" for any X = {18,19,21,22} and the example code ran error-free.
  • I changed BB-MIKROBUS-CAPE-3.dtbo so that spi gets enabled in the pinctrl-section and the example code ran error-free.

To my understanding both of this ways should enable SPI, but when I try to read previously written data from the click module, I can't receive any data at all or select a cell to write to.

So, is there a way to get any of my attempts working so that I can get access to the click module via SPI? Or have I overlooked an other solution?

Btw:

  • I tried all solutions on the board itself and on a microSD card which I set up using https://beagleboard.org/getting-started
  • I also tried it with and without setting "disable_uboot_overlay_video=1" in the uEnv.txt

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.