bone101 | Presentation web server written in bonescript
kandi X-RAY | bone101 Summary
kandi X-RAY | bone101 Summary
Getting started information for [BeagleBone and BeagleBone Black] written in [BoneScript] The content here is presented by the default web server running with the demonstration Linux distributions provided on BeagleBone and BeagleBone Black. It is written in HTML and makes use of the BoneScript server running on the board and BoneScript JavaScript library running in these HTML pages.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of bone101
bone101 Key Features
bone101 Examples and Code Snippets
Community Discussions
Trending Discussions on bone101
QUESTION
There is very little information how to configure the Beaglebone for PWM on newer versions of the kernel. I followed the instructions from PWM on BeagleBone Black (v4.14) to interface with the PWM chips, but now I need to figure out the pin that each chip is connected to.
Based on the Cape Expansion Headers image in the BeagleBone Black documentation, I know:
EHRPWM0A
=P9_22
EHRPWM0B
=P9_21
EHRPWM1A
=P9_14
EHRPWM1B
=P9_16
EHRPWM2A
=P8_19
EHRPWM2B
=P8_13
ECAP0
=P9_42
When I run ls -lh /sys/class/pwm
to see the available PWM interfaces I see:
ANSWER
Answered 2018-May-06 at 20:41Page 184 of the TI AM335x and AMIC110 Sitara Processors Technical Reference Manual gives the memory map for the PWM chips:
PWM Subsystem 0:
0x48300000
eCAP0
:0x48300100
ePWM0
:0x48300200
PWM Subsystem 1:
0x48302000
eCAP1
:0x48302100
ePWM1
:0x48302200
PWM Subsystem 2:
0x48304000
eCAP2
:0x48304100
ePWM2
:0x48304180
The address of each PWM interface (posted in the question) contains the hardware address. Matching these addresses gives us:
EHRPWM0
(ePWM0
) ispwmchip1
EHRPWM1
(ePWM1
) ispwmchip3
EHRPWM2
(ePWM2
) ispwmchip6
ECAP0
(eCAP0
) ispwmchip0
Each EHRPWM
chip has two PWM output channels, thus the A
and B
variants. They are exported by echoing a 0
or 1
to export
. These channels must use the same frequency, but can have a different duty cycle.
Therefore, given this interface configuration, EHRPWM0A
and EHRPWM0B
are located at:
QUESTION
I have been attempting to get access to GPIO2 and GPIO3 on the beaglebone black through kernel module with no success. Every time I attempt to assign an output value to GPIOs 2 and 3 I get a segmentation fault.
The exact same code (with the appropriate pin assignment) works for GPIO0 and GPIO1.
I have attempted various pins on both P8 and P9 related to GPIO2 and GPIO3 with no success. On the flip side, the same exact code works for GPIO0 and GPIO1 with appropriate pin assignment.
For pin values I am using the official BBB manual. For appropriate I/O GPIO availability I am checking this diagram from beagleboard.com:
...ANSWER
Answered 2018-Jan-01 at 21:45The answer as to why your code is getting a segmentation fault is actually irrelevant, because, as a kernel module, it is misguided, needs to be tossed, and you need to rewrite it. Your module has absolutely no business trying to gain direct access to the "GPIO (control) registers", which are already owned by the pin-control (pinctrl) subsystem.
GPIO pins are a (generic) resource that the kernel manages. Would you write a driver that just starts using an arbitrary block of memory for its buffers?
Hopefully no, because memory is (another) resource managed by the kernel.
But your module is just wantonly using GPIO pins at its own whim!
Refer to the proper GPIO document for the exact Linux kernel version that you are using: Documentation/gpio.txt for version 3.8.13.
The available routines that your module can use include:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install bone101
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page