100% found this document useful (2 votes)
33 views

Programming With STM32: Getting Started With the Nucleo Board and C/C++ - eBook PDF - Quickly download the ebook in PDF format for unlimited reading

The document promotes various eBooks available for instant download at ebookluna.com, focusing on programming with STM32, Intel Galileo, Arduino, Raspberry Pi, and other related topics. It emphasizes the ease of access and the benefits of engaging with the material through practical projects. Additionally, it includes copyright information and details about the author's background and expertise in the field of embedded systems and programming.

Uploaded by

glisicnovac
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
33 views

Programming With STM32: Getting Started With the Nucleo Board and C/C++ - eBook PDF - Quickly download the ebook in PDF format for unlimited reading

The document promotes various eBooks available for instant download at ebookluna.com, focusing on programming with STM32, Intel Galileo, Arduino, Raspberry Pi, and other related topics. It emphasizes the ease of access and the benefits of engaging with the material through practical projects. Additionally, it includes copyright information and details about the author's background and expertise in the field of embedded systems and programming.

Uploaded by

glisicnovac
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 46

Quick and Easy Ebook Downloads – Start Now at ebookluna.

com for Instant Access

Programming With STM32: Getting Started With the


Nucleo Board and C/C++ - eBook PDF

https://ebookluna.com/download/programming-with-
stm32-getting-started-with-the-nucleo-board-and-c-c-ebook-
pdf/

OR CLICK BUTTON

DOWLOAD EBOOK

Instantly Access and Download Textbook at https://ebookluna.com


We believe these products will be a great fit for you. Click
the link to download now, or visit ebookluna.com
to discover even more!

Programming the Intel Galileo: Getting Started with the Arduino -


Compatible Development Board 1st Edition - eBook PDF

https://ebookluna.com/download/programming-the-intel-galileo-getting-
started-with-the-arduino-compatible-development-board-ebook-pdf/

Programming Arduino: Getting Started with Sketches 2nd Edition - eBook PDF

https://ebookluna.com/download/programming-arduino-getting-started-with-
sketches-tab-ebook-pdf/

Programming the Photon: Getting Started with the Internet of Things 1st
edition - eBook PDF

https://ebookluna.com/download/programming-the-photon-getting-started-with-
the-internet-of-things-ebook-pdf/

Programming the Raspberry Pi, Third Edition: Getting Started with Python
Simon Monk - eBook PDF

https://ebookluna.com/download/programming-the-raspberry-pi-third-edition-
getting-started-with-python-ebook-pdf/
Programming Arduino: Getting Started with Sketches 3rd Edition Simon Monk -
eBook PDF

https://ebookluna.com/download/programming-arduino-getting-started-with-
sketches-ebook-pdf/

Programming the Photon: Getting Started with the Internet of Things (Tab)
1st Edition - eBook PDF

https://ebookluna.com/download/programming-the-photon-getting-started-with-
the-internet-of-things-tab-ebook-pdf/

(eBook PDF) Programming, Problem Solving and Abstraction with C

https://ebookluna.com/product/ebook-pdf-programming-problem-solving-and-
abstraction-with-c/

Readings from Programming with C++ 1st Edition Kyla Mcmullen - eBook PDF

https://ebookluna.com/download/readings-from-programming-with-c-ebook-
pdf-2/

Readings from Programming with C++ 1st Edition Kyla Mcmullen - eBook PDF

https://ebookluna.com/download/readings-from-programming-with-c-ebook-pdf/
Copyright © 2018 by McGraw-Hill Education. All rights reserved. Except as
permitted under the United States Copyright Act of 1976, no part of this
publication may be reproduced or distributed in any form or by any means, or
stored in a database or retrieval system, without the prior written permission of
the publisher.

ISBN: 978-1-26-003132-4
MHID: 1-26-003132-2

The material in this eBook also appears in the print version of this title: ISBN:
978-1-26-003131-7, MHID: 1-26-003131-4.

eBook conversion by codeMantra


Version 1.0

All trademarks are trademarks of their respective owners. Rather than put a
trademark symbol after every occurrence of a trademarked name, we use names
in an editorial fashion only, and to the benefit of the trademark owner, with no
intention of infringement of the trademark. Where such designations appear in
this book, they have been printed with initial caps.

McGraw-Hill Education eBooks are available at special quantity discounts to use


as premiums and sales promotions or for use in corporate training programs. To
contact a representative, please visit the Contact Us page at
www.mhprofessional.com.

Information contained in this work has been obtained by McGraw-Hill


Education from sources believed to be reliable. However, neither McGraw-Hill
Education nor its authors guarantee the accuracy or completeness of any
information published herein, and neither McGraw-Hill Education nor its
authors shall be responsible for any errors, omissions, or damages arising out of
use of this information. This work is published with the understanding that
McGraw-Hill Education and its authors are supplying information but are not
attempting to render engineering or other professional services. If such services
are required, the assistance of an appropriate professional should be sought.
TERMS OF USE

This is a copyrighted work and McGraw-Hill Education and its licensors reserve
all rights in and to the work. Use of this work is subject to these terms. Except as
permitted under the Copyright Act of 1976 and the right to store and retrieve one
copy of the work, you may not decompile, disassemble, reverse engineer,
reproduce, modify, create derivative works based upon, transmit, distribute,
disseminate, sell, publish or sublicense the work or any part of it without
McGraw-Hill Education’s prior consent. You may use the work for your own
noncommercial and personal use; any other use of the work is strictly prohibited.
Your right to use the work may be terminated if you fail to comply with these
terms.

THE WORK IS PROVIDED “AS IS.” McGRAW-HILL EDUCATION AND


ITS LICENSORS MAKE NO GUARANTEES OR WARRANTIES AS TO
THE ACCURACY, ADEQUACY OR COMPLETENESS OF OR RESULTS
TO BE OBTAINED FROM USING THE WORK, INCLUDING ANY
INFORMATION THAT CAN BE ACCESSED THROUGH THE WORK VIA
HYPERLINK OR OTHERWISE, AND EXPRESSLY DISCLAIM ANY
WARRANTY, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
TO IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR
A PARTICULAR PURPOSE. McGraw-Hill Education and its licensors do not
warrant or guarantee that the functions contained in the work will meet your
requirements or that its operation will be uninterrupted or error free. Neither
McGraw-Hill Education nor its licensors shall be liable to you or anyone else for
any inaccuracy, error or omission, regardless of cause, in the work or for any
damages resulting therefrom. McGraw-Hill Education has no responsibility for
the content of any information accessed through the work. Under no
circumstances shall McGraw-Hill Education and/or its licensors be liable for any
indirect, incidental, special, punitive, consequential or similar damages that
result from the use of or inability to use the work, even if any of them has been
advised of the possibility of such damages. This limitation of liability shall apply
to any claim or cause whatsoever whether such claim or cause arises in contract,
tort or otherwise.
About the Author

Donald J. Norris has a degree in electrical engineering and an MBA


specializing in production management. He is currently an adjunct professor
teaching an Embedded Systems course in the College of Engineering,
Technology and Aeronautics, part of the Southern New Hampshire University
(SNHU). He has also taught many different undergrad and grad courses mainly
in the computer science and technology areas at SNHU and other regional
schools for the past 33 years. Don created and taught the initial robotics courses
at SNHU both on-campus and online.
Don retired from civilian government service with the U.S. Navy, where he
specialized in underwater acoustics related to nuclear submarines and associated
advanced digital signal processing systems. Since then, he has spent more than
23 years as a professional software developer using the C, C#, C++, Python,
Micro Python, Node.JS, JavaScript, PHP, and Java languages in varied
development projects. He also has been a certified IT security consultant for the
last six years.
He has written and had published seven books including three involving the
Raspberry Pi, one on how to build and fly your own drone, a book on the Intel
Edison, one on the Internet of Things, and one on Micro Python.
Don started a consultancy, Norris Embedded Software Solutions (dba NESS
LLC), which specializes in developing application solutions using
microcontrollers, sensors, and actuators. The business has also recently
completed several robotics projects for clients.
Don likes to think of himself as a perpetual hobbyist and geek and is
constantly trying out new technologies and out-of-box experiments. He is a
licensed private pilot, photography buff, amateur extra class operator, avid
runner, and most importantly, a proud grandfather of three great kids,
Evangeline, Hudson, and Holton.
This book is dedicated to Dr. Peter Kachavos, my son-in-law, who is a
remarkably intelligent man with an equally remarkable long medical career in
service to his patients and the community. Until recently, Peter was a practicing
internist with an office in Manchester, NH. He recently retired after 25 years
from that practice and soon will be pursuing other interesting opportunities in
the medical field.

Peter enjoys cooking, fine wine, traveling, and spending quality time with his
family. His wife is my daughter, Shauna, and their child is my two-year-old
granddaughter, Evangeline.

Peter and I have spent many hours discussing many topics ranging from ancient
Greek artifacts to the latest technologies impacting modern society. I always
look forward to those interesting and challenging discussions.
CONTENTS AT A GLANCE

1 Introduction to the STMicroelectronics Line of Microcontrollers

2 STM MCU Software

3 STM32CubeMX Application

4 STM Project Development

5 General-Purpose Input Output (GPIO) and the STM Hardware Abstraction


Layer (HAL)

6 Interrupts

7 Timers

8 Bit Serial Communications

9 Analog-to-Digital Conversion

10 Pulse Width Modulation (PWM)

11 Direct Memory Access (DMA) and the Digital-to-Analog Converter (DAC)

Index
CONTENTS

Preface

1 Introduction to the STMicroelectronics Line of Microcontrollers


Microcomputer vs Microcontroller
STM Nucleo Boards
Principal MCU Components
Bit Serial Ports
Nucleo-64 Board Options
Summary

2 STM MCU Software


Open-Source versus Commercial Proprietary Software
Bare Metal Development
Brief History of MCU
The MCU Toolchain
Configuring a STM32 Toolchain
Summary

3 STM32CubeMX Application
Pinout Tab
MCU Alternative Functions
Integrated Peripheral (IP) Tree Pane
Creating an Example Project using CubeMX
The main.c Code Listing
ARM Cortex Microcontroller Software Interface Standard (CMSIS)
CubeMX-Generated C Code
Compiling and Downloading the Project
Downloading the Hex Code
Summary

4 STM Project Development


Hello World Project
Creating the Hello Nucleo Project
Adding Functionality to the Program
Visit https://testbankfan.com
now to explore a rich
collection of testbank or
solution manual and enjoy
exciting offers!
Compiling and Executing the Modified Program
Simple Modification for the main.c Function
Complex Modification for the main.c File
Summary

5 General-Purpose Input Output (GPIO) and the STM Hardware


Abstraction Layer (HAL)
Memory-Mapped Peripherals
Core Memory Addresses
Peripheral Memory Addresses
HAL_GPIO Module
GPIO Pin Hardware
LED Test Demonstration
Enabling Multiple Outputs
Push-Button Test Demonstration
Clock Speed Demonstration
Setting the Pin Clock Speeds
Summary

6 Interrupts
Interrupts
NVIC Specifications
Interrupt Process
External Interrupts
Interrupt Demonstration
Summary

7 Timers
STM Timer Peripherals
STM Timer Configuration
Update Event Calculation
Polled or Non-interrupt Blink LED Timer Demonstration
Test Run
Interrupt-Driven Blink LED Timer Demonstration
Test Run
Multi-rate Interrupt-Driven Blink LED Timer Demonstration
Test Run
Modification to the Multi-rate Program
Test Run
Summary

8 Bit Serial Communications


UARTs and USARTs
USART Configuration
Windows Terminal Program
Enabling USART2
USART Transmit Demonstration Program
Test Run
USART Receive Demonstration Program
Test Run
Summary

9 Analog-to-Digital Conversion
ADC Functions
ADC Module with HAL
ADC Conversion Modes
Channels, Groups, and Ranks
ADC Demonstration
ADC Demonstration Software
Summary

10 Pulse Width Modulation (PWM)


General-Purpose Timer PWM Signal Generation
Timer Hardware Architecture
PWM Signals with HAL
Enabling the PWM Function
PWM Demonstration Software
Demonstration One
Demonstration Two
Demonstration Three
Demonstration Four
Adding Functional Test Code
Test Results
Summary

11 Direct Memory Access (DMA) and the Digital-to-Analog


Converter (DAC)
DMA
Basic Data Transfer Concepts
DMA Controller Details
Using HAL with DMA
Demonstration One
DAC Peripheral
DAC Principles
HAL Software for the DAC
Demonstration Two
Demonstration Three
Summary
PREFACE

This book will serve both as an introduction to the STMicroelectronics line


of STM32 microcontrollers (MCUs) and also as an easy-to-follow Getting
Started Guide for readers interested in developing with a STM MCU. I will be
using one of the very inexpensive STM Nucleo-64 development boards for all of
the book projects, which should make it inviting for most readers to become
involved with the hardware. In fact, doing the book demonstration projects is
really the only way you can really be assured that you have gained a good
comprehension of the material in this book.
I will state from the beginning that it is simply not possible to gain a total
understanding of how a STM MCU functions by only reading this book. The
manufacturer datasheets that describe individual STM MCUs are often over
1,000 pages in length, which describes the enormity of the task of trying to
master the voluminous amount of information that describes these devices.
Instead, the book contents focus on a few of the core components that make up a
STM MCU and how to program those components to accomplish fairly simple
tasks.
Some readers will have trepidation about starting to develop with what are
typically considered professional grade MCUs. I wish to allay that fear and state
that I have found that developing applications with at least one representative
sample STM MCU to be remarkably easy and straightforward. In fact, I will
state that in some aspects it is easier to develop with a STM MCU than with an
Arduino or Raspberry Pi, which many readers will already be quite familiar and
probably have already created projects with those boards.
Often, the single biggest issue with developing with MCUs is setting up a
stable development toolchain. I will describe how to do this in a simple to
follow, step-by-step process, which if you rigorously follow will guarantee that
you will be able to quickly and without much trouble generate working binary
programs. These programs will then be quickly downloaded into the
development board for execution.
1
Introduction to the
STMicroelectronics Line of
Microcontrollers

This chapter provides you with an introduction to the very comprehensive


STMicroelectronics (STM) line of microcontrollers (MCUs). I will be focusing
only on several specific controllers throughout the book, but that should provide
you with an adequate representation of the functions and capabilities of the full
line of STM MCUs.

Microcomputer vs Microcontroller
I believe at the start of this book that it must make very clear the differences
between a microcomputer and a MCU. The reason for this distinction is very
simple: STM is a company that designs and manufacturers MCUs, not
microcomputers. I think my following definition of a MCU is as good as any
that I have read:

A microcontroller is an integrated system containing a minimum of a


microprocessor, dynamic and non-volatile memory, and a set of peripherals
consistent with all design requirements.

Right away, you can see from the definition that a MCU contains a
microprocessor which is sometimes referred to as a microcomputer. There also
must be both dynamic or volatile memory as well as nonvolatile or static
memory, where the latter holds any programs or scripts necessary to run the
Discovering Diverse Content Through
Random Scribd Documents
SUNSETS ON CLEARWATER LAKE, MINN.

(To Mrs. A. W. W.)


First Evening

A path of trembling gold, from where I stand,


Across the limpid lake, to darkling woods,
Upon the far off strand,
Where evening’s glory broods,
Until it changes into rose,
A livid pink, suffusing all,
The mighty water’s deep repose;
And as the fiery ball
Drops into clouds on the horizon’s rim,
The hue, most delicate, takes on a crimson glow,
In which the shadows of the shore grow dim,
And slowly all things into darkness flow;
Anon the moon appears and clothes the scene
And floating mist-veil into languid sheen.

Second Evening
A sea of fire in which a sky
Of lavender and blue and red
Together with the clouds of changing dye
Reflected are—divinely wed;
And we, who rove about, are led
By an illusion, such as seldom seen:
A strange receding of the deep,
As if we sat above a waterfall,
O’er which our skiff full soon must leap
Into immensity, bright, hyaline,
Where brooding spirits beck and call.

A glorious view is heaven in the depth


Of tranquil seas, but more
Its virtues, mirrored in a human heart;
And thou, who hast its kindnesses so kept,
That changing vistas or receding shore
Can not extinguish life’s immortal part
In the abiding love divine, as clear
As all this evening glory in a glassy mere,
Art more than all what nature can express,
Whose word can cheer, whose gentle hand can bless.

Illusions!—much is but illusions:


Fear, and all the ghosts that troop with it.
The good alone, in all its sweet effusion,
Is real as the sun, by which the world is lit;
The cataract of death, the dread abyss—
Does not exist, for all the light is His.

Third Evening
To-night the rising storm-clouds hide
The sun’s departure from our gaze;
A heavy mist begins to glide
Across the water’s ashen face;
A host of swallows, circling, fly
Like cavalcades upon a plain;
A myriad of insects die,
Uncounted lives, like drops of rain
Lost in the sea, lost in the All,
The life, the death, the Oversoul.
And little children laugh and play
Upon the beach, and on the pier,
In them the closing of the day,
With gathering storm, awakes no fear,
For in their souls the light remains,
That oped the water-lily’s breast,
And woke the warbler’s glad refrain,
And all the heart of nature blest;
What matters though the clouds obscure
Its finished course one single eve,
If we, like children, can allure
Even clouds and mist to pleasure give.

Fourth Evening
The glitt’ring wavelets blind my sight,
And neath the hand I needs must scan
The dazzling shimmer of the light,
Which like Seraphic highways span
The breeze-swept, glad expanse;
Methinks I see the Naiads dance
To music of the swaying reeds
And rushes, where the narrows jut,
Adorned with many-colored weeds,
From Neptune’s gardens freshly cut.

Amid the glimmer one discerns


A boat wherein a youth doth stand,
Like Hiawatha’s passing, turn
Its prow with dreamy ease from land,
The well nigh naked youth to me
Is like a god of Grecian mould,
Whose perfect form and symmetry
Is like Apollo’s of old;
He speaks to fellows in the deep,
Whose heads move ’mid the curling gleams,
Alas, that death should ever reap
Among such scenes of pleasant dreams!

But nature always clamors for


What she hath lent to life a while,
And though we borrow more and more,
And all her powers do beguile,
Yet comes the hour on land or sea,
She asks for all with usury.

The boy lifts up his hands and dives,


A pleasant plunge that has no dread,
But I recall some precious lives,
Which thus were reckoned ’mongst the dead,
And in my heart, at end of day,
A prayer for the lads I say.
Fifth Evening

Song of the West-wind o’er the waves,


Song of the billows, as the lave
The shoreline with a mystic moan,
Song of the rushes in the shallow,
Song of the aspen tree and sallow,—
Ever as the undertone.

Song of cicadas and the cricket


From ragged grasses and the thicket,
Song of the whirring dragon-fly,
That goes to sea, but for to die,
Song of the warblers, flitting nigh,
Song of the loon’s weird, distant cry.

Song of a horn on yonder hill,


That echoes in the far away,
The tone is soft as of a rill,—
“The end of a perfect day”—
As sinks the sun, and I depart,
With all this music in my heart.
TWILIGHT

A dull, pink evening sky,


A white ridge shadow-streaked below,
The tall, dark trees near by,—
In the deep snow.

Two horses, one is white,


As white as is the new-fall’n snow,
The other black as darkest night,—
Along the highway go.

One, emblem of the parting day,


The other, of approaching night,
And o’er the hill the rosy ray
Of this one hour’s delight.
APRIL

O, I love the month of April, when the southwind gently blows,


Calling nature from its slumber, from cold winter’s long repose,
Till the meadow its awakening by a tint of verdure shows,
And the willow with bright saffron in the evening sunshine glows;

When the meadow-lark is standing on the fence-post, with its throat


Lifted up to merry lovesongs which across the prairies float;
When the robin on the house-lawn proudly stands in his red coat,
Then a-sudden makes departure with a shrill and happy note;—

When the air is full of meaning, clothed in life’s sweet mystery,


Touching all things with its magic, even with love’s ecstasy,
And you see it and you feel it, it is upon land and sea,
It is nature’s Easter dawning after drear Gethsemane.

And the children’s faces brighten, and their laughter has a ring
Which no winter-sport could give them, and no lamplight play could bring;
Even the aged in whose bosom life’s enchantments seldom sing,
Take a pleasure in the message of this happy month of spring.

Jocund April, lovely April, of all months my choice thou art,


Since in thee there is a solace for all nature’s weary heart,
And in thee there is a promise that we all shall have a part
In the hope which man professes through his worship and his art.
I’M A PART OF THE WIND AND THE CURLING WAVE

I’m a part of the wind and the curling wave,


Of the budding trees and the tender blade,
A part of the life that has burst its grave,
Of crocus and buttercup studding the glade,
Of the goose-berry bush and the shadow it throws,
Of the moss on the rocks and the slender ferns,
Of the burly weed that earliest grows,
And all that quickens and upward yearns.

I’m a part of the light, and the golden flash


Of the flicker’s wing o’er the glittering pond,
Of the sable crow in the lofty ash,
A-calling his mate in the trees beyond;
Of the dragon-fly’s gossamer wing and flight;
Of the insect just risen from winter’s sleep;
Of things that find in the sun delight,
Whether they blossom, or fly, or creep.

A part of the risen life and the all


Eternal Spirit, anew each spring,
Wherefore I follow its kindly call,
To hear the carol His angels sing,—
What saith it? O, you must hear it alone,
In the paths of the woods on an April day,
And feel, as I do, you are truly one
With nature—to fathom the glorious lay.
THE CHIPPING SPARROW

The clouds are hanging dark and low,


The budding trees are still quite bare,
And from the North the cold winds blow,
Of spring we almost might despair.

But from the branches, ashen gray,


Outside my window, comes a song,
A warbling Chipping Sparrow’s lay,
To cold and dimness nonchalant.

His music has a thrilling joy,


It warms the soul, allures a smile,
Its brooding doubts he does destroy,
And makes it happy like a child.

And now a sudden, cheering gleam


Falls on him from a rift of blue,
I see him in a golden dream,—
I know that song alone is true.

His crimson tuft a poet’s crown,


His tawny breast a badge of love,
And that clear sunray coming down,
Our Father’s watchful eye above.
IN THE LILAC-BLOSSOM-TIME
When the fragrance of the purple and lavender lilac-bloom
Meets the sweet distilled aroma from the plum and apple-trees,
And the dainty scent of violets amid the garden-gloom,
Where’s the music of the hum and drone of pollen-painted bees,
Then my soul takes up its harp, which long upon the willows hung,
And attunes it to the gladness that is floating in the air,
For it is in lilac-blossom-time that everything grows young,
And the heart of man is lighter, and has little less of care.

In the lilac-blossom-time it seems, the brown thrush blithest sings,


And the wood-dove cooes the deepest from a breast brimful with love,
And the Oriole’s glad music clearest ’mongst the branches rings,
To its mate that sits abrooding on the nest upon the bough;
And the Whip-poor-will is calling from the woodlands dark, at eve,
With a zest which makes the farmer feel that even the night hath song,
And in the cool of day he thinks, it is quite good to live,
“Since after toil I here can rest the lilac-trees among.”

In the lilac-blossom-time, methinks, are children happiest,


Since with that blossoms’ coming a great liberty draws nigh,
The days of school are over, and they feel supremely blest
In the days mid nature’s glories, ’neath the blue and open sky,
Or to lie beneath the lilacs with a story-book in hand,
Reading perfume into fancies, Puck and fairies twixt each line,
Till the heart is with them dancing in a happy wonderland,
While the shadows of the after-noon with lilac hues combine.

In the lilac-blossom-time the lovers often fondly meet,


And drink the blossom’s odor, a true potency for dreams,
And oftest when the evening-dew makes it a tenfold sweet,
A-trembling like a tear of joy within the clear moonbeam,
The youth in his new happiness a prince of kingdoms is,
The maiden is a being fair, as from some other clime,
And heaven itself is upon earth in that pure, binding kiss,
There in her father’s garden in the lilac-blossom-time.
THE RUNNEL’S DITTY
I met a runnel amid the meads,
In the evening, in the evening,
And it did ramble ’mongst rush and reeds,
In the evening, in the evening,
And I did linger to hear its song,
As it did carelessly wind along,
In the evening, in the evening.

What sang the runnel upon its way?


In the evening, in the evening;
I listened long to its happy lay,
In the evening, in the evening;
But all my musing seemed but in vain,
And all its music awoke but pain,
In the evening, in the evening.

The blooming thornapple on its bank,


Also listened, also listened,
And flags and buttercups, dewy dank,
Also listened, also listened;
And thrushes nestling in alder-trees,
Did hush their babes with its melodies,
And they listened, and they listened.

I asked the violets on its side,


In the evening, in the evening,—
If they its song would to me confide,
In the evening, in the evening;
And like some children of guileless soul
They said: “Its lay is the song of all,
In the evening, in the evening.”

“The ceaseless longing to reach the sea,


In the evening, in the evening;
The song of life and eternity,
In the evening, in the evening;
A lay of love in the early morn,
Al fh h l dl
A lay of hope to the lone and lorn,—
In the evening, in the evening.”
THE CHILD AND THE GOSPEL OF ST. JOHN

She pored o’er the open page


Of the Gospel, according to John,
Where the Ruler did Christ engage
At hours of the silent night,
And sought for his soul that light,
Which God sent forth through His Son.

But she could not read a word,


A child of four summers she,
Not ever, even once, had she heard
That story of second birth,
Nor asked, like the wise of the earth,
“O, Lord, how can these things be?”

Her face had the glory of heaven,


The look of an angel her eye,
I said: “And to her it is given
To know, for her soul is one
With the soul of this page of John,
And the wisdom that comes from on high.”
THE BIRTHDAY CAKE

Five little candles on her birthday cake,


Five little candles brightly burning,
We gaze on them, while memories awake
Of happy moments, nevermore returning.

Five little years of childhood happiness,


Five little years, when oft we played together,
How often did her love and joy us bless,
When days seemed dark, and stormy was the
weather.

The tiny lights are dying one by one,


As one by one the years their flight have taken,
I shed a tear for that which thus is gone,
And kiss the child for whom the cake was baken.
MY GOLDFISH

Five little goldfish in a vase


My simple study-room do grace,
And oft when tired of reading books,
I turn to them my weary looks,
And pleasure find in their quaint ways,
Reminding me of ancient lays.

Amid the deep, on sparkling sands,


A tow’ring Gothic castle stands,
Its gates and windows open wide,
Through which the lustrous carplings glide,
Like sea-nymphs in the days of old,
Like mermaids in an age of gold.

They hide beneath the dark green weed,


And fondly on its frondlets feed,
It seems an island near the shore,
Where Lorelei did sing of yore,
And gold and green most softly blend,
As then—ere romance had an end.

O, days of legendary lore,


Of fairy-folk and nymphs galore!
When tired of this prosaic age,
And weary of the modern page,
I find my golden fish suggest
The dreams with which your life was blest.

II
Sometimes, when in uphappy mood,
I on my limitations brood,
And think how narrow the confines,
In which the soul almost repines,
I turn again—just to behold
My finny friends of burnished gold.

How little is their rounded sphere,


Though rivers wide are rushing near!
How little chance themselves to be,
In freedom’s realm, the sunny sea!
I wonder not that mournful gape,
And rolling glance they seem to ape.

Yet, all the pity I bestow


Is tearless, since in heart I know,
It would be fatal for my fish
To leave the boun’dry of their dish,
For they would be an easy prey
To larger ones in stream or bay.

And then this moral comes to me,


While craving larger liberty;
It might be death the bounds to break,
Which fate and duty round me make,
So be content and get the best
Of what, perhaps, is but a jest.
THE FIDDLER’S CHRISTMAS MUSIC

(Founded on a Norwegian Folk-lore.)


There lived in the land of Ole Bull
A peasant-fiddler of old,
Whose soul with music was often more full
Than his violin ever told.
He knew not the art of clefs and notes,
Such seemed but some mystic runes,
But he heard the music that richly floats
In nature’s unwritten tunes.

He played for the dances at many a farm,


Led many a bridal train,
And everywhere did he naively charm
The mirth-loving maid and swain;
But sometimes he played in a lonely place,
When no one, perchance, was near,
And then there was sadness in his face,
In his eyes a furtive tear.

For the strains which he heard he could never play,


Though trying it o’er and o’er,
Forgotten they were from day to day,
And wandered his way no more;
Sometimes in anger he flung the thing,
Which would not obey his soul,
Then took it again with its broken string,
Like a mother her child from his fall.

On a Christmas eve he had listened long


To the tones in the snowy air—
The bells that sent forth their joyous song,
Re-echoing here and there
In mountain hollow or forest deep,
Or far o’er the frozen fjord,
A thousand voices woke from their sleep,
To join in the heavenly chord.

In the house the Christmas feast was spread,


A dh d d k h h ld
And he ate and drank as he should,
There was meat and pudding and raisin bread,
And the Yule-tide brew was good;
They feasted well on that holy eve,
And did not forget a pray’r,
And the fiddler felt it was good to live,
For banished he had all care.

In his sleep that night he seemed to see


His room full of fairy-folk,
They danced about with a wondrous glee
To the tunes their fiddler awoke—
Such tunes as he never had heard before,
So soft, so clear, and gay,
Like silver ripples against a shore,
In the morn of a summer’s day.

He saw the player, his strings and bow,


Each touch of his finger tips,
From which such gladness did overflow,
With pleasure of lovers’ lips;
He asked the elfin to teach him one,
Ah, one from his repertoire,
Which he gladly did, and when it was done,
Another, just for encore.

He taught him three, and he taught him four,


Yea, six, while the fairies danced,
Till a tankard of beer fell to the floor,
At which the elfin glanced,
And saw a cross on its side engraved,
Then rose and run with a cry,
The fairies following, as morning waved
His rosy plumes in the sky.

The peasant awoke from his fairy dream,


Sought his fiddle, began to play,
And strange enough, as it now may seem,
R b dt i th lfi
Remembered tunes in the elfin way,
He played them all till the day shone bright,
He played them all till the church bells rang,
To call to mass among candle lights,
To hear the story which angels sang.

But neither mass, nor the homily


Could fix his mind on the solemn things;
An absent look in his face one might see,
And his fingers moved as on fiddle-strings;
His wife did see it and almost wept,
And prayed that he for sweet heaven’s sake
Might be from fairies and devils kept,
Both when asleep, or when awake.

That Christmas season, for three weeks long,


He played for dances, yea, every night,
His melodies were both sweet and strong,
And gave the people such great delight,
They said they never before had heard
Such music come from a violin,
And wondereed much of what things had stirred
The fiddler’s heart, or where he had been.

But this he kept to himself alone,


For often since he the fairies saw,
List to their music when brightly shone
The moon on greensward or glitt’ring snow,
And more and more did he learn their art,
Yea, some did whisper, he was possest,
But he had won every woman’s heart,
When he was old, and was laid to rest.
CRUEL KITTY

Kitty is playing on the side of the hill,


All in the new-mown grass,
Hunting a butterfly; O, don’t you kill
That beautiful thing, alas!
She caught it and wounded its wings!

“How cruel of kitty to play in this way;”


Your friend on top of the hill,
If she were alive, now surely would say,
Alas, that her voice should be still!
That prattled of beautiful things.

In her grave on the hill the little one lies;


Her kitten at play in the hay;
And looking thereon a mother’s heart cries,
With grief she is pining away,
Like the butterfly’s sunder-torn wings.
TO ——

Were I an artist, I would paint thee thus:—


Tall, lithe and slender, like a Grecian youth
In flowing garb, whose lines enhance the form,
A face whose soul is innocence and truth,
And eyes of dreamy love, that blesses us
With gladness, like the sunlight after storm.

Were I a master of sweet music, I


Would turn the rhythm of thy motion, and
Thy voice and laughter into melody,
A symphony, fit for a royal band,
With joy of glitt’ring waves and zephyr’s sigh
With love’s entrancement and pure ecstasy.

But I, alas, have nothing but a rhyme,


In which to clothe the pleasure of an hour,—
An hour amid the fields and on the stream;
I picked for thee the rarest, sweetest flower,
A wild rose, mingling odor with the thyme,
Since that seems truest of a poet’s dream.
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebookluna.com

You might also like