Index

Note: Page numbers followed by “f” indicate figures, “t” indicate tables.
A
Aborting delay of FreeRTOS, 148
Absolute maximum ratings, 31t
Access individual bits, in MikroC Pro, 69
Acorn RISC Machine (ARM), 15
Analog comparator modules, 9
Analog-to-digital converters (ADCs), 9, 30
ARM Cortex microcontroller development boards
Clicker 2 for MSP432, 41
Clicker 2 for STM32, 44
EasyMX Pro V7 For STM32, 35
EasyMx Pro V7 for Tiva, 39
fusion for ARM V8, 43
LPC1768, 33
mbed application board, 38
MINI-M4 for STM32, 40
STM32F4DISCOVERY board, 36
STM32 Nucleo family, 34
Tiva EK-TM4C123GXL LaunchPad, 42
ARM microcontrollers, architecture of, See also Programming ARM-based microcontrollers
analog-to-digital converters, 30
built-in temperature sensor, 30
Cortex-A, 17
Cortex-M series
compatibility, 18
M0, 16
M0+, 16
M3, 16
M4, 16
M7, 16
processor comparison, 17
Cortex-R, 16
digital-to-analog converter, 31
electrical characteristics, 31
external interrupt controller, 30
general purpose inputs and outputs, 27
nested vectored interrupt controller, 30
processor performance measurement, 18
reset, 31
STM32F407VGT6 microcontroller
basic features of, 19
clock circuit of, 23
internal block diagram of, 21
low power modes, 23
power supply, 23
timers, 30
ASCII chart, 84
Assembly listing, in MikroC Pro, 89
Auto reload register (TIMx_ARR), 362
Auto-reload timers, 255
B
Backup domain reset, 31
BaseType_t, 118
Battery-operated portable applications, 15
Binary semaphore, 225
Bit data type, in MikroC Pro, 70
Blocked state, 119
Bluetooth interface, 11
Bootloader program, 44, 52
Brown-out detectors, 8
Buggy, 423
Built-in temperature sensor, 30
Bus fault, 70
C
CAN interface, 11
Car park control, 397
Car park management system
project 55: car park control, 397
Ccm, memory type specifiers, 69
Central processing unit (CPU), 5
Change timer period, 258
Changing LED flashing rate, 176
from PC keyboard, 189, 206
Choosing scheduling algorithm, 108
Clicker 2 for MSP432, 41
Clicker 2 for STM32 development board
input-output pins, 51
On-board LEDs, 48
On-board mikroBUS sockets, 50
On-board push-button switches, 48
oscillators, 52
power supply, 49
programming on-board microcontroller, 52
reset switch, 49
Clock, 7
circuit of STM32F407VGT6 microcontroller
configuring clock, 24
external clock sources, 23
internal clock sources, 24
generator circuit, 26f
security system enable, 74
selection, 76f
Code, memory type specifiers, 69
Communicating with Arduino, 315
Compiler case sensitivity, 114
Compiling template program, 115
Complex instruction computer (CISC), 8, 12
Complex real-time systems, 97
Configurable exceptions, 70
Configuring clock, 24
Contact bouncing problem, 357
Controlling Buggy
lights, 431
motors, 432
remotely, 451
Controlling flashing of LED, 242
Co-operative scheduling, 99
Cortex-A, 17
Cortex-M4 based microcontrollers, interrupts in
general, 347
internal interrupts (timer interrupts), 361
project 44-External interrupt based event counter, 354
project 45-Multiple external interrupts, 358
project 46-Generating waveform using timer interrupt, 363
project 47-External interrupt with timer interrupt, 365
STM32F407 interrupts
external interrupts, 349
Cortex-M series
compatibility, 18
M0, 16
M0+, 16
M3, 16
M4, 16
M7, 16
processor comparison, 17
Cortex-R, 16
Counter register (TIMx_CNT), 362
Creating new task, FreeRTOS task-related functions, 121
Critical sections
project 42: critical sections-sharing UART, 339
project 43: suspending scheduler, 345
sharing UART, 339
suspending scheduler, 344
Crystal oscillator connection, 26f
Current sink/source capability, 10
D
Daemon task, 255
Data memory, 5
type specifiers, 69
Data types of FreeRTOS, 118
DEBUG functions, 67
Debugging, 83
Deferred interrupt processing, 372, 377
Digital signal processing applications, 2
Digital-to-analog converter, 31
Displaying task
info on PC screen, 195
list on PC screen, 192
state on PC screen, 198
Display the free processor time, 324
Dynamic priority scheduling, 108
E
EAction, 334
EasyMX Pro V7
for STM32, 35
for Tiva, 39
Electrical characteristics, 31
Electrically erasable programmable read only memory (EEPROM), 6
Embedded controller, 1
Erasable programmable read only memory (EPROM), 6
Ethernet interface, 11
Event bit, 235
Event counter, 266
Event groups
creating and deleting, 236
event flags and, 235
project 25-sending internal and external temperature data to PC, 238
project 26-controlling flashing of an LED, 242
project 27-GPS based project, 246
related functions, from interrupt service routine, 382
setting, clearing, waiting For event group bits, and getting event group bits, 236
EWARM, 56
Example projects
project 31-square wave generation with adjustable frequency, 271
project 32: frequency sweep waveform generator, 275
project 33: RGB light controller, 279
project 34: home alarm system with keyboard, 281
project 35: ultrasonic car parking with buzzer, 292
project 36: stepper motor project, 302
project 37: communicating with Arduino, 315
External clock
pulse, 7
sources, 23
External high-speed clock
bypass, 74
enable, 74
External interrupt, 348, 349
based event counter, 354
with timer interrupt, 365
External interrupt controller (EXTI), 30
External Li-polymer battery, 50f
External resistor-capacitor timing components, 7
F
Falling trigger selection register (EXTI_FTSR), 352
FIFO (First In First Out), 203
Finite-state machine (FSM), 99
First come first served, 107
Flash electrically erasable programmable read only memory, 7
Flashing at different rates after receiving notifications, 335
Flip-flop circuits, 357
For ARM, 61
FreeRTOS
aborting delay, 148
API function calls from ISR
deferred interrupt processing, 372
event group related functions from ISR, 382
project 48-using function xTaskResumeFromISR(), 374
project 49-deferred interrupt processing, 377
project 50-using function xTaskNotifyFromISR(), 377
project 51-using function xEventGroupSetBitsFromISR(), 383
project 52-using functions xTimerStartFromISR() and xTimerChangePeriodFromISR(), 387
project 53-using functions xSemaphoreTakeFromISR() and xSemaphoreGive(), 391
project 54-using functions xQueueSendFromISR() and xQueueReceive(), 393
queue related functions, 391
semaphore related functions, 390
task related functions, 373
timer related functions, 386
xHigherPriorityTaskWoken parameter, 372
compiler case sensitivity, 114
compiling template program, 115
data types, 118
developing project files, 112
distribution, 110
function names, 118
headers files path and source files path, 114
installing from MikroElektronika web site, 111
macro definitions, 118
project 9-displaying a task name, number of tasks, and tick count on the LCD, 148
project 10-7-segment 2-digit multiplexed LED display counter, 151
project 11-7-segment 4-digit multiplexed LED display counter, 159
project 12-7-segment 4-digit multiplexed LED display event counter, 163
project 13-traffic lights controller, 167
project 14-changing LED flashing rate, 176
project 15-sending data to a PC over USB serial link, 181
project 16-changing LED flashing rate from the PC keyboard, 189
project 17-displaying the task list on PC screen, 192
project 19-displaying the task info on the PC screen, 195
project 20-displaying the task state on the PC screen, 198
task info, 195
task list, 189
task parameters, 200
task-related functions
creating new task, 121
delaying task, 122
deleting task, 130
getting task handle, 131
priorites, 136
project 1-flashing an LED every second, 122
project 2-flashing two LEDs, one every second, other one every 200 ms, 125
Project 2-flashing two LEDs, one every second, other one every 200 ms ?, 122
project 3-suspending and resuming task, 128
project 4-flashing LEDs and deleting task, 130
project 5-flashing an LED using function vTaskDelayUntil(), 134
project 6-flashing LED and push-button switch at different priorities, 136
project 7-getting/setting task priorities, 137
resuming suspended task, 128
running at fixed intervals, 134
suspending task, 127
tick count, 134
task state, 198
task states, 118
using LCD
connecting LCD to Clicker 2 for STM32 development board, 142
functions, 143
HD44780 LCD module, 141
project 8-displaying text on LCD, 144
task name, number of tasks, and tick count, 147
variable names, 118
yield to another task of equal priority, 148
Frequency sweep waveform generator, 275
Function names, 118
Fusion for ARM V8, 43
G
Games-based applications, 14
General purpose inputs and outputs (GPIO), 27
GPIO_Alternate_Function_Enable, 68
GPIO_Analog_Input, 68
GPIO_Clk_Config, 64
GPIO_Clk_Disable, 64
GPIO_Clk_Enable, 64
GPIO_Digital_Input, 68
GPIO_Digital_Output, 68
GPIO_Set_Pin_Mode, 67
Generate square waveform, 263
Generating waveform using timer interrupt, 363
Get timer period, 258
GLCD bitmap editor, 85
Global variables, 203
GPS based project, 246
H
Hard Fault, 70
Harvard architecture, 11
H-bridge motor direction control, 428f
HD44780 LCD module, 141
Header files, 57
Headers files path, for FreeRTOS, 114
HID terminal, 85
High-level languages, 2
High-speed external (HSE), 23
High-speed internal (HIS), 24
Home alarm system, with keyboard, 281
I
Idle task and idle task hook
project 39: display the free processor time, 324
Input-output pins, 51
Installing from MikroElektronika web site, 111
Instruction cycle, 7
Integrated development environments support
EWARM, 56
Mbed, 56
MDK, 56
MikroC Pro, 58
System Workbench for STM32 by AC6, 57
TrueStudio for STM32, 57
Integrated inter connect (I2C), 9
Internal clock
registers, 24
sources, 24
Internal high-speed clock enable, 74
Internal interrupts (timer interrupts), 361
Internal oscillator of microcontroller, 7
Internal resistor-capacitor timing components, 7
Interrupt Assistant, 71
Interrupt for button at port pin PA10 (on-board button), 359
Interrupt mask register (EXTI_IMR), 352
Interrupts, 8
assistant, 85
and exceptions
exceptions, 70
interrupt service routine, 71
sources, 348
Interrupt service routine (ISR), 8, 71
Interrupt vector address, 8
K
Kernel advantages, 98
L
LCD custom character, 85
LCD drivers, 9
LCD, using (FreeRTOS)
connecting LCD to Clicker 2 for STM32 development board, 142
functions, 143
HD44780 LCD module, 141
project 8-displaying text on LCD, 144
task name, number of tasks, and tick count, 147
Library manager, 88
Libstock website, 59
Lights (LEDs), 431
Longest remaining time first, 107
Low power
modes, 23
operation, 10
Low speed external (LSE), 24
Low-speed internal (LSI), 24
LPC1768, 33
M
Macro definitions, FreeRTOS, 118
Mbed, 56
application board, 38
MDK, 56
Memory, 5
management, 70
type specifiers, 69
Microcomputer systems
microcontroller architectures, See also ARM microcontrollers
complex instruction computer, 12
reduced instruction set computer, 12
microcontroller features
analog comparator modules, 9
analog-to-digital converter, 9
bluetooth interface, 11
Brown-out detectors, 8
CAN interface, 11
clock, 7
current sink/source capability, 10
ethernet interface, 11
integrated inter connect, 9
interrupts, 8
LCD drivers, 9
low power operation, 10
power-on reset, 10
real-time clock, 10
reset input, 8
serial input-output, 9
serial peripheral interface, 9
sleep mode, 10
supply voltage, 7
timers, 7
USB interface, 10
watchdog, 8
Wi-Fi, 11
microcontroller systems
electrically erasable programmable read only memory, 6
erasable programmable read only memory, 6
flash electrically erasable programmable read only memory, 7
programmable read only memory, 6
random access memory, 5
read only memory, 6
Microcontroller development kit, 2
MikroBUS pin configurations, 51f
MikroC Pro, 58
access individual bits, 69
for ARM, 61
ASCII chart, 84
Assembly listing, 89
bit data type, 70
creating new project
uploading executable code, 78
debugging, 83
general purpose input-output
GPIO_Alternate_Function_Enable, 68
GPIO_Analog_Input, 68
GPIO_Clk_Config, 64
GPIO_Clk_Disable, 64
GPIO_Clk_Enable, 64
GPIO_Digital_Input, 68
GPIO_Digital_Output, 68
GPIO_Set_Pin_Mode, 67
GLCD bitmap editor, 85
HID terminal, 85
interrupt assistant, 85
interrupts and exceptions
exceptions, 70
interrupt service routine, 71
LCD custom character, 85
library manager, 88
memory type specifiers, 69
options window, 93
output files, 93
PORT input-output, 69
seven segment editor, 86
simulation
setting break points, 83
statistics, 88
UDP terminal, 86
USART terminal, 86
USB HID bootloader, 88
MINI-M4 for STM32, 40
Mobile robot project
Buggy, 423
lights (LEDs), 431
project 57: controlling Buggy lights, 431
project 58: controlling Buggy motors, 432
project 59: obstacle avoiding Buggy, 438
project 60: controlling Buggy remotely, 451
wheel motors, 427
Multilevel queue scheduling, 108
Multiple external interrupts, 358
2-digit multiplexed LED display counter, 151
4-digit multiplexed LED display counter, 159
4-digit multiplexed LED display event counter, 163
Multiplexed LED applications, 152
Multitasking
choosing scheduling algorithm, 108
kernel advantages, 98
real-time operating system, need for, 98
task scheduling algorithms
co-operative scheduling, 99
other scheduling algorithms, 107
preemptive and nonpreemptive scheduling difference, 107
preemptive scheduling, 105
round-robin scheduling, 104
scheduling algorithm goals, 106
Mutexes, See Semapores
N
Nested vectored interrupt controller (NVIC), 30, 349
Nonmaskable interrupt (NMI), 70, 348
Nonpreemptive scheduling, 99
O
Obstacle avoiding Buggy, 438
On-board LEDs, 48
On-board mikroBUS sockets, 50
On-board mikroProg programmer, 39
On-board push-button switches, 48
One-shot timers, 255
ON-OFF temperature controller, 214
Open-drain output pin, 28f
Options window, 93
Oscillators, 7, 52
Output files, in MikroC Pro, 93
Oven temperature control system, microcontroller base, 3f
P
PcNameToQuery, 131
Pending register (EXTI_PR), 352
PendSV, 71
Phase locked loop (PLL), 24
Pin configuration of HD44780 LCD module, 142t
Port bit set/reset register, 29
Port configuration registers, 28
Port data registers, 29
PORT input-output, 69
Port locking register, 29
Port pins, 29
Power-on reset, 10
Power reset, 31
Power supply, 49
Preemptive scheduling, 105
and nonpreemptive scheduling difference, 107
Prescaler register (TIMx_PSC), 362
Priority inheritance, 226
Processor performance measurement, 18
Programmable read only memory (PROM), 6
Program memory, 5
Programming ARM-based microcontrollers
integrated development environments support
EWARM, 56
Mbed, 56
MDK, 56
MikroC Pro, 58
System Workbench for STM32 by AC6, 57
TrueStudio for STM32, 57
Programming on-board microcontroller, 52
Project
car park management system
55: car park control, 397
Cortex-M4
44-external interrupt based event counter, 354
45-multiple external interrupts, 358
46-generating waveform using timer interrupt, 363
47-external interrupt with timer interrupt, 365
critical sections
42: critical sections-sharing UART, 339
43: suspending scheduler, 345
event groups
25-sending internal and external temperature data to PC, 238
26-controlling flashing of LED, 242
27-GPS based project, 246
examples
31-square wave generation with adjustable frequency, 271
32: frequency sweep waveform generator, 275
33: RGB light controller, 279
34: home alarm system with keyboard, 281
35: ultrasonic car parking with buzzer, 292
36: stepper motor project, 302
37: communicating with Arduino, 315
FreeRTOS
9-displaying task name, number of tasks, and tick count on LCD, 148
10-7-segment 2-digit multiplexed LED display counter, 151
11-7-segment 4-digit multiplexed LED display counter, 159
12-7-segment 4-digit multiplexed LED display event counter, 163
13-traffic lights controller, 167
14-changing LED flashing rate, 176
15-sending data to a PC over USB serial link, 181
16-changing LED flashing rate from PC keyboard, 189
17-displaying task list on PC screen, 192
19-displaying task info on PC screen, 195
20-displaying task state on PC screen, 198
FreeRTOS (API function calls from ISR)
48-using function xTaskResumeFromISR(), 374
49-deferred interrupt processing, 377
50-using function xTaskNotifyFromISR(), 377
51-using function xEventGroupSetBitsFromISR(), 383
52-using functions xTimerStartFromISR() and xTimerChangePeriodFromISR(), 387
53-using functions xSemaphoreTakeFromISR() and xSemaphoreGive(), 391
54-using functions xQueueSendFromISR() and xQueueReceive(), 393
idle task and idle task hook
39: display the free processor time, 324
mobile robot project
57: controlling Buggy lights, 431
58: controlling Buggy motors, 432
59: obstacle avoiding Buggy, 438
60: controlling Buggy remotely, 451
queue management
21-changing LED flashing rate from the PC keyboard, 206
22-using various queue functions, 210
23-ON-OFF temperature controller, 214
semapores
24-sending internal and external temperature data to PC, 228
software timers
28-reaction timer, 259
29-generate square waveform, 263
30-event counter, 266
task notifications
40: start flashing an LED after receiving notification, 331
41: flashing at different rates after receiving notifications, 335
time in different cities
56: time project, 413
Pull-down pin, 29f
Pull-up and pull-down resistors, 28
Pull-up pin, 29f
PulNotificationValue, 334
Pulse width modulated (PWM) signals, 428
Push-pull output pin, 28f
Push-pull output port, structure of, 28
Push-pull transistors, 28
PvParameters, 121
PvTaskCode, 121
PxCreatedTask, 121
PxPreviousWakeTime, 133
PxTask, 128, 134
PxTaskToResume, 127
PxTaskToSuspend, 125
Q
Queue functions, 210
Queue management
creating queue, sending and receiving data using, 204
deleting queue, name of queue, resetting queue, 209
functions, 213
global variables, 203
project 21-changing LED flashing rate from the PC keyboard, 206
project 22-using various queue functions, 210
project 23-ON-OFF temperature controller, 214
Queue related functions, 391
Queues, 203
R
Radio Frequency IDentification (RFID), 397
Random access memory (RAM), 5
Raspberry Pi single-board computer, 15
RDM6300 RFID reader, 399f
Reaction timer, 259
Read only memory (ROM), 6
Ready state, 119
Real-time clock (RTC), 10
Real-time operating system, need for, 98
Reduced instruction set computer (RISC), 12, 15
Reset, 31
Reset input, 8
Reset switch, 49
RGB light controller, 279
Rising trigger selection register (EXTI_RTSR), 352
Round-robin scheduling, 104
RS232 communication, 9
Running state, 119
S
Scheduling algorithm
goals, 106
others
dynamic priority scheduling, 108
first come first served, 107
longest remaining time first, 107
multilevel queue scheduling, 108
shortest remaining time first, 107
Schmitt trigger circuits, 357
Semapores
creating binary, 226
creating counting, 227
deleting semaphore, getting semaphore count, 227
giving and taking, 227
Project 24: sending internal and external temperature data to PC, 228
related functions, 390
Sending data to PC over USB serial link, 181
Sending internal and external temperature data to PC, 228, 238
Serial input-output, 9
Serial peripheral interface (SPI), 9
Setting break points, 83
Seven segment editor, 86
Sfr, memory type specifiers, 69
Shortest remaining time first, 107
Simple resistor capacitor circuits, 357
Simulation, setting break points in MikroC Pro, 83
Sleep mode, 10, 23
Software timers
change timer period, get timer period, 258
creating, deleting, starting, stopping, and resetting a timer, 256
project 28-reaction timer, 259
project 29-generate square waveform, 263
project 30-event counter, 266
timer name and ID, 259
Sophisticated temperature controller, 4f
Source files path, for FreeRTOS, 114
Square wave generation with adjustable frequency, 271
Standby mode, 23
Start flashing an LED after receiving notification, 331
State machines, 99
Statistics, in MikroC Pro, 88
Stepper motor project, 302
ST-LINK V2 programmer, 53f
STM32 development board, connecting LCD to Clicker 2 for, 142
STM32F4DISCOVERY board, 36
STM32F407 interrupts
external interrupts, 349
STM32F407VGT6 microcontroller
basic features of, 19
clock circuit of
configuring clock, 24
external clock sources, 23
internal clock sources, 24
internal block diagram of, 21
low power modes, 23
power supply, 23
STM32 Nucleo family, 34
Stop mode, 23
Supervisor Call (SVC), 71
Supply voltage, 7
Suspended state, 119
Suspending scheduler, 344, 345
SYSCFG_EXTICR1, 351t
SYSCFG_EXTICR2, 351t
SYSCFG_EXTICR3, 351t
SYSCFG_EXTICR4, 352t
System reset, 31
System Workbench for STM32 by AC6, 57
SysTick, 71
T
Task info of FreeRTOS, 195
Task list of FreeRTOS, 189
Task notifications
project 40: start flashing an LED after receiving notification, 331
project 41: flashing at different rates after receiving notifications, 335
xTaskNotify() and xTaskNotifyWait(), 333
xTaskNotifyGive() and uITaskNotifyTake(), 330
xTaskNotifyStateClear() and xTaskNotifyQuery(), 338
Task parameters, 200
Task-related functions, 373
FreeRTOS
creating new task, 121
delaying task, 122
deleting task, 130
getting task handle, 131
priorites, 136
project 1-flashing an LED every second, 122
project 2-flashing two LEDs, one every second, other one every 200 ms, 122, 125
project 3-suspending and resuming task, 128
project 4-flashing LEDs and deleting task, 130
project 5-flashing an LED using function vTaskDelayUntil(), 134
project 6-flashing LED and push-button switch at different priorities, 136
project 7-getting/setting task priorities, 137
resuming suspended task, 128
running at fixed intervals, 134
suspending task, 127
tick count, 134
Task scheduling algorithms
co-operative scheduling, 99
other scheduling algorithms, 107
preemptive and nonpreemptive scheduling difference, 107
preemptive scheduling, 105
round-robin scheduling, 104
scheduling algorithm goals, 106
Task state of FreeRTOS, 118, 198
Temperature control system, with Wi-Fi capability, 5f
Template program, 113f
TickType_t, 117
Time project, 413
Timer, 7, 30
interrupts, 361
related functions, 386
Tiva EK-TM4C123GXL LaunchPad, 42
Traffic lights controller, 167
TrueStudio, for STM32, 57
U
UDP terminal, 86
UlBitsToClearOnEntry, 334
UlBitsToClearOnExit, 334
Ultrasonic car parking with buzzer, 292
UlValue, 334
Universal synchronous-asynchronous receiver-transmitter (USART), 9
Uploading executable code, in MikroC Pro, 78
Usage fault, 71
USART terminal, 86
USB HID bootloader, 88
USB interface, 10
UsStackDepth, 121
UxNewPriority, 134
UxPriority, 121
UxTaskPriorityGet(), 134
V
Variable names of FreeRTOS, 118
Voltage regulator circuit, 7
Von Neumann architecture, 11
W
Watchdog, 8
Waveform displayed on screen, 367f
Wheel motors, 427
Wi-Fi, 11
capability, temperature control system with, 5f
X
XClearCountOnExit, 331
XEventGroupSetBitsFromISR(), 383
XQueueSendFromISR() and xQueueReceive(), 393
XSemaphoreTakeFromISR() and xSemaphoreGive(), 391
XTaskNotifyFromISR(), 377
XTaskResumeFromISR(), 374
XTaskToNotify, 334
XTicksToDelay, 122
XTicksToWait, 331, 335
XTimeIncrement, 133
XTimerStartFromISR() and xTimerChangePeriodFromISR(), 387
Y
Yield to another task of equal priority, FreeRTOS, 148
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.21.104.109