1-Wire Implementation on PocketBeagle

349 views
Skip to first unread message

caleb.c...@gmail.com

unread,
Feb 15, 2018, 3:03:58 PM2/15/18
to BeagleBoard
I am trying to implement the 1-Wire protocol to read a DS18B20 temperature sensor on the PocketBeagle. So far I have been able to correctly read the temperature on a BeagleBone Black (BBB) using the following guide:


I changed the .dts file below to use the same GPIO port on the BBB (P8.11 - GPIO45) as on the PocketBeagle (P2.33 - GPIO45) on line 19 and added the missing semicolon on line 37. I checked the GPIO offset for both of these pins and they are the same, so it should be the same signal.

/*
* Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* Modified  by Russell Senior from the weather cape's DTS file.
* Minor formatting by C W Rose.
*/

/dts-v1/;
/plugin/;


/ {
    compatible
= "ti,beaglebone", "ti,beaglebone-black";
    part
-number = "BB-W1";
    version
= "00A0";


    exclusive
-use = "P8.11"; /*changed to P2.33 for PocketBeagle*/


    fragment@0
{
        target
= <&am33xx_pinmux>;
        __overlay__
{
             bb_w1_pins
: pinmux_bb_w1_pins {
                 pinctrl
-single,pins =  <0x34 0x37 /* gpmc_ad13.gpio1_13, OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE7 - w1-gpio */ >;
             
};
       
};
   
};


    fragment@1
{
        target
= <&ocp>;
        __overlay__
{
            onewire@0
{
                status          
= "okay";
                compatible      
= "w1-gpio";
                pinctrl
-names   = "default";
                pinctrl
-0       = <&bb_w1_pins> /*missing semicolon here!*/


                gpios
= <&gpio2 13 0>;
           
};
       
};
   
};
};


However, when I try to use the same procedure on the PocketBeagle (which is running Ubuntu), I run into a problem when trying to load the overlay. The guide I have been following uses the capemgr.9 for the BBB, which is not supported by the PocketBeagle. I then tried to load the overlay using the uEnv.txt file to load the overlay (.dcbo file located in /lib/firmware/) at boot. I uncommented the master enable and Overlay 1 lines and replaced the "file" placed holder with the .dcbo file name.

After attempting the reboot the PocketBeagle to load the overlay, the PocketBeagle gets stuck during its boot procedure and fails to fully boot and have to reflash the SD card to boot the device; I believe this is due to trying to load the overlay. 

Therefore I have a few questions:
  • Is there information in the above .dts file that is causing this error? 
  • Is changing "P8.11" to "P2.33" supported by the PocketBeagle?
  • Are there any other steps I am missing to load the overlay using uEnv.txt?

Any help on this would be greatly appreciated!

Robert Nelson

unread,
Feb 15, 2018, 3:12:57 PM2/15/18
to Beagle Board, caleb.c...@gmail.com
Give this a shot:

https://gist.github.com/RobertCNelson/dfd4f707a89b83c9366ecfcdc24321b0

In fragment 0, we drop the cape-universal pinmux for P2_33, this
free's up the pin for dedicated functions.

In fragment 1, no change

In fragment 2, &gpio2 -> &gpio1

Regards,

--
Robert Nelson
https://rcn-ee.com/

evilwulfie

unread,
Feb 15, 2018, 3:13:08 PM2/15/18
to beagl...@googlegroups.com
I cant help you with a pocket beagle but i can help.
dont reflash. put a bootable SD card in  boot and mount the emmc

mount -t ext4 /dev/mmcblk1p1 /mnt/emmcext
cd /mnt/emmcext/boot

comment out the offending line in your uEnv.txt file

umount /mnt/emmcext

and reboot
--
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 beagleboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/9a452247-e7b2-4bb0-80b1-0f83482aee23%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Robert Nelson

unread,
Feb 15, 2018, 3:14:43 PM2/15/18
to Beagle Board, caleb.c...@gmail.com

Robert Nelson

unread,
Feb 15, 2018, 3:15:23 PM2/15/18
to Beagle Board, evilwulfie
On Thu, Feb 15, 2018 at 2:12 PM, evilwulfie <evilw...@gmail.com> wrote:
> I cant help you with a pocket beagle but i can help.
> dont reflash. put a bootable SD card in boot and mount the emmc
>
> mount -t ext4 /dev/mmcblk1p1 /mnt/emmcext
> cd /mnt/emmcext/boot
>
> comment out the offending line in your uEnv.txt file
>
> umount /mnt/emmcext

No eMMC on the PocketBeagle..
Reply all
Reply to author
Forward
0 new messages