element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Single-Board Computers
  • Products
  • Dev Tools
  • Single-Board Computers
  • More
  • Cancel
Single-Board Computers
Forum Enabling TIMER4 output on Beaglebone Black
  • Blog
  • Forum
  • Documents
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Single-Board Computers to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 6 replies
  • Subscribers 57 subscribers
  • Views 1495 views
  • Users 0 members are here
  • beagleboneblack
  • bbb
Related

Enabling TIMER4 output on Beaglebone Black

deker
deker over 11 years ago

Hi,

 

I'm trying to get things set up to use TIMER4 (or 5, 6, or 7) to provide an external clock source to another component and I'm having some trouble. For now I'm happy with just getting the standard 24khz clock, though I may want to be able to modify the frequency in the future.

 

I'm using the Yocto Project (Dora) to build my images and the straight TI kernels from the meta-ti layer (linux-ti-staging_3.12) with a static devicetree. I've customized my devicetree enough that I'm somewhat comfortable with devicetree configs, but I know I'm a long way from having real devicetree-fu. That said, I've added the following in an attempt to get TIMER4 to come up:

 

In the am33xx_pinmux section:

 

        timer4_pins: pinmux_timer4_pins {
          pinctrl-single,pins = <
            0x90 0x12  /* gpmc_advn_ale as TIMER4, OUTPUT_PULLUP | MODE2 */
          >;
        };

 

And further down (note: I'm not certain this is necessary or correct, but it was a shot in the dark):


&timer4_fck {
        pinctrl-names = "default";
        pinctrl-0 = <&timer4_pins>;
        status = "okay";
};

 

I sadly don't have a scope to verify clock on the TIMER4 pin, but my guess is that something's not qorking right from the following reported in /sys/kernel/debug/clk/clk_

summary (note: I clipped bit after the relevant part):

 

root@beaglebone:/sys/kernel/debug/clk# more clk_summary
   clock                        enable_cnt  prepare_cnt  rate
---------------------------------------------------------------------
tclkin_ck                      0           0            12000000 
virt_26000000_ck               0           0            26000000 
virt_25000000_ck               0           0            25000000 
virt_24000000_ck               1           1            24000000 
    sys_clkin_ck                9           23           24000000 
       dpll_mpu_ck              1           1            300000000
          dpll_mpu_m2_ck        4           4            300000000
       timer6_fck               0           1            24000000 
       timer3_fck               0           1            24000000 
       dbg_sysclk_ck            0           1            24000000 
       timer7_fck               0           1            24000000 
       timer5_fck               0           1            24000000 
       timer4_fck               0           1            24000000 
       timer2_fck               1           1            24000000 
       timer1_fck               1           1            24000000 

I also haven't seen the device that needs the clocking initialize properly yet, so that's another tipoff.

 

Maybe related, I'm also seeing the following in the dmesg:

 

[    0.132509] platform mpu.1: FIXME: clock-name 'fck' DOES NOT exist in dt!

 

Any help or pointers would be appreciated. I've tried looking at section 20 in the AM335x TRM and I get the feeling there's just a register setting or two that need to be done, but I'm just beginning to learn the hardware end of the universe after many years as a UN*X guy, so I got a bit lost in trying to figure out how to do it.

 

Thanks,

 

-d

  • Sign in to reply
  • Cancel
Parents
  • daveismith
    0 daveismith over 10 years ago

    Did you ever manage to get this working? I'm trying to enable this timer as well, and not having a lot of success. I've got the following overlay

     

    /dts-v1/;
    /plugin/;
    
    
    / {
            compatible = "ti,beaglebone","ti,beaglebone-black";
    
    
            /* identification */
            part-number = "BB-TIMER4";
            version = "00A0";
    
    
            /* state of the resources this cape uses */
            exclusive-use =
                    /* the pin header uses */
                    "P8.7", /* timer4 */
                    /* the hardware timer */
                    "timer4";
    
    
            fragment@0 {
                    target = <&am33xx_pinmux>;
                    __overlay__ {
                            bb_timer4_pins: pinmux_bb_timer4_pins {
                                    pinctrl-single,pins = <
                                            0x090 0x32      /* MODE2 */
                                    >;
                            };
                    };
            };
    
    
            fragment@1 {
                    target = <&timer4>;
                    __overlay__ {
                            status="okay";
                            pinctrl-names = "default";
                            pinctrl-0 = <&bb_timer4_pins>;
                            clock-frequency = <10>;
                    };
            };
    };

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • daveismith
    0 daveismith over 10 years ago

    Did you ever manage to get this working? I'm trying to enable this timer as well, and not having a lot of success. I've got the following overlay

     

    /dts-v1/;
    /plugin/;
    
    
    / {
            compatible = "ti,beaglebone","ti,beaglebone-black";
    
    
            /* identification */
            part-number = "BB-TIMER4";
            version = "00A0";
    
    
            /* state of the resources this cape uses */
            exclusive-use =
                    /* the pin header uses */
                    "P8.7", /* timer4 */
                    /* the hardware timer */
                    "timer4";
    
    
            fragment@0 {
                    target = <&am33xx_pinmux>;
                    __overlay__ {
                            bb_timer4_pins: pinmux_bb_timer4_pins {
                                    pinctrl-single,pins = <
                                            0x090 0x32      /* MODE2 */
                                    >;
                            };
                    };
            };
    
    
            fragment@1 {
                    target = <&timer4>;
                    __overlay__ {
                            status="okay";
                            pinctrl-names = "default";
                            pinctrl-0 = <&bb_timer4_pins>;
                            clock-frequency = <10>;
                    };
            };
    };

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube