2
2
3
3
Let's get familiar with the hardware we'll be working with.
4
4
5
- ## STM32F3DISCOVERY (the "F3")
5
+ ## micro : bit
6
6
7
7
<p align =" center " >
8
- <img title =" F3 " src =" ../assets/f3 .jpg " >
8
+ <img title =" micro:bit " src =" ../assets/microbit .jpg " >
9
9
</p >
10
10
11
- We'll refer to this board as "F3" throughout this book. Here are some of the
12
- many components on the board:
11
+ Here are some of the many components on the board:
13
12
14
13
- A [ microcontroller] .
15
- - A number of LEDs, including the eight aligned in a "compass" formation.
16
- - Two buttons.
17
- - Two USB ports.
18
- - An [ accelerometer] .
19
- - A [ magnetometer] .
20
- - A [ gyroscope] .
14
+ - A number of LEDs, most notably the LED matrix on the back
15
+ - Two user buttons as well as a reset button (the one next to the USB port).
16
+ - One USB port.
17
+ - A sensor that is both a [ magnetometer] and an [ accelerometer]
21
18
22
19
[ microcontroller ] : https://en.wikipedia.org/wiki/Microcontroller
23
20
[ accelerometer ] : https://en.wikipedia.org/wiki/Accelerometer
24
21
[ magnetometer ] : https://en.wikipedia.org/wiki/Magnetometer
25
22
[ gyroscope ] : https://en.wikipedia.org/wiki/Gyroscope
26
23
27
24
Of these components, the most important is the microcontroller (sometimes
28
- shortened to "MCU" for "microcontroller unit"), which is the large black square
29
- sitting in the center of your board. The MCU is what runs your code. You might
30
- sometimes read about "programming a board", when in reality what we are doing
31
- is programming the MCU that is installed on the board.
25
+ shortened to "MCU" for "microcontroller unit"), which is the bigger of the two
26
+ black squares sitting on the side of the board with the USB port. The MCU is
27
+ what runs your code. You might sometimes read about "programming a board", when
28
+ in reality what we are doing is programming the MCU that is installed on the board.
32
29
33
- ## STM32F303VCT6 (the "STM32F3")
30
+ If you happen to be interested in a more in detail description of the board you
31
+ can checkout the [ micro: bit website] ( https://tech.microbit.org/hardware/ ) .
32
+
33
+ ## Nordic nRF51822 (the "nRF51")
34
34
35
35
Since the MCU is so important, let's take a closer look at the one sitting on our board.
36
36
37
- Our MCU is surrounded by 100 tiny metal ** pins** . These pins are connected to
38
- ** traces** , the little "roads" that act as the wires connecting components
37
+ Our MCU has 48 tiny metal ** pins** sitting right underneath it (it's a so called [ QFN48 ] chip).
38
+ These pins are connected to ** traces** , the little "roads" that act as the wires connecting components
39
39
together on the board. The MCU can dynamically alter the electrical properties
40
40
of the pins. This works similar to a light switch altering how electrical
41
41
current flows through a circuit. By enabling or disabling electrical current to
@@ -44,68 +44,57 @@ be turned on and off.
44
44
45
45
Each manufacturer uses a different part numbering scheme, but many will allow
46
46
you to determine information about a component simply by looking at the part
47
- number. Looking at our MCU's part number (` STM32F303VCT6 ` ), the ` ST ` at the
48
- front hints to us that this is a part manufactured by [ ST Microelectronics] .
49
- Searching through [ ST's marketing materials] we can also learn the following:
50
-
51
- [ ST Microelectronics ] : https://st.com/
52
- [ ST's marketing materials ] : https://www.st.com/en/microcontrollers-microprocessors/stm32-mainstream-mcus.html
53
-
54
- - The ` M32 ` represents that this is an Arm®-based 32-bit microcontroller.
55
- - The ` F3 ` represents that the MCU is from ST's "STM32F3" series. This is a
56
- series of MCUs based on the Cortex®-M4 processor design.
57
- - The remainder of the part number goes into more details about things like
58
- extra features and RAM size, which at this point we're less concerned about.
59
-
60
- > ### Arm? Cortex-M4?
61
- >
62
- > If our chip is manufactured by ST, then who is Arm? And if our chip is the
63
- > STM32F3, what is the Cortex-M4?
64
- >
65
- > You might be surprised to hear that while "Arm-based" chips are quite
66
- > popular, the company behind the "Arm" trademark ([ Arm Holdings] [ ] ) doesn't
67
- > actually manufacture chips for purchase. Instead, their primary business
68
- > model is to just * design* parts of chips. They will then license those designs to
69
- > manufacturers, who will in turn implement the designs (perhaps with some of
70
- > their own tweaks) in the form of physical hardware that can then be sold.
71
- > Arm's strategy here is different from companies like Intel, which both
72
- > designs * and* manufactures their chips.
73
- >
74
- > Arm licenses a bunch of different designs. Their "Cortex-M" family of designs
75
- > are mainly used as the core in microcontrollers. For example, the Cortex-M0
76
- > is designed for low cost and low power usage. The Cortex-M7 is higher cost,
77
- > but with more features and performance. The core of our STM32F3 is based on
78
- > the Cortex-M4, which is in the middle: more features and performance than the
79
- > Cortex-M0, but less expensive than the Cortex-M7.
80
- >
81
- > Luckily, you don't need to know too much about different types of processors
82
- > or Cortex designs for the sake of this book. However, you are hopefully now a
83
- > bit more knowledgeable about the terminology of your device. While you are
84
- > working specifically with an STM32F3, you might find yourself reading
85
- > documentation and using tools for Cortex-M-based chips, as the STM32F3 is
86
- > based on a Cortex-M design.
47
+ number. Looking at our MCU's part number (` nRF51822-QFAA-R ` , you probably cannot
48
+ see it with your bare eye, but it is on the chip), the ` n ` at the
49
+ front hints to us that this is a part manufactured by [ Nordic Semiconductor] .
50
+ Looking up the part number on their website we quickly find the [ product page] .
51
+ There we learn that our chip's main marketing point is that it is a
52
+ "Bluetooth Low Energy and 2.4 GHz SoC" (SoC being short for "System on a Chip"),
53
+ which explains the RF in the product name since RF is short for radio frequency.
54
+ If we search through the documentation of the chip linked on the [ product page]
55
+ for a bit we find the [ product specification] which contains chapter 10 "Ordering Information"
56
+ dedicated to explaining the weird chip naming. Here we learn that:
57
+
58
+ [ QFN48 ] : https://en.wikipedia.org/wiki/Flat_no-leads_package
59
+ [ Nordic Semiconductor ] : https://www.nordicsemi.com/
60
+ [ product page ] : https://www.nordicsemi.com/Products/Low-power-short-range-wireless/nRF51822
61
+ [ product specification ] : https://infocenter.nordicsemi.com/pdf/nRF51822_PS_v3.3.pdf
62
+
63
+ - The ` nRF51 ` is the MCU's series, indicating that there are other ` nRF51 ` MCUs
64
+ - The ` 822 ` is the part code
65
+ - The ` QF ` is short for ` QFN48 `
66
+ - The ` AA ` is the variant code, indicating how much RAM and flash memory the MCU has,
67
+ in our case 256 kilobyte flash and 16 kilobyte RAM
68
+ - The ` R ` is the packaging code which is relevant for factories manufacturing boards
69
+ with this chip on them in larger scales
70
+
71
+ The product specification does of course contain a lot more useful information about
72
+ the chip, for example that it is based on an ARM® Cortex™-M0 32 bit processor.
73
+
74
+ ### Arm? Cortex-M0?
75
+
76
+ If our chip is manufactured by Nordic, then who is Arm? And if our chip is the
77
+ nRF51822, what is the Cortex-M0?
78
+
79
+ You might be surprised to hear that while "Arm-based" chips are quite
80
+ popular, the company behind the "Arm" trademark ([ Arm Holdings] [ ] ) doesn't
81
+ actually manufacture chips for purchase. Instead, their primary business
82
+ model is to just * design* parts of chips. They will then license those designs to
83
+ manufacturers, who will in turn implement the designs (perhaps with some of
84
+ their own tweaks) in the form of physical hardware that can then be sold.
85
+ Arm's strategy here is different from companies like Intel, which both
86
+ designs * and* manufactures their chips.
87
+
88
+ Arm licenses a bunch of different designs. Their "Cortex-M" family of designs
89
+ are mainly used as the core in microcontrollers. For example, the Cortex-M0
90
+ (the core our chip is based on) is designed for low cost and low power usage.
91
+ The Cortex-M7 is higher cost, but with more features and performance.
92
+
93
+ Luckily, you don't need to know too much about different types of processors
94
+ or Cortex designs for the sake of this book. However, you are hopefully now a
95
+ bit more knowledgeable about the terminology of your device. While you are
96
+ working specifically with an nRF51822, you might find yourself reading
97
+ documentation and using tools for Cortex-M-based chips, as the nRF51822 is
98
+ based on a Cortex-M design.
87
99
88
100
[ Arm Holdings ] : https://www.arm.com/
89
-
90
- ## The Serial module
91
-
92
- <p align =" center " >
93
- <img title =" Serial module " src =" ../assets/serial.jpg " >
94
- </p >
95
-
96
- If you have an older revision of the discovery board, you can use this module to
97
- exchange data between the microcontroller in the F3 and your computer. This module
98
- will be connected to your computer using an USB cable. I won't say more at this
99
- point.
100
-
101
- If you have a newer release of the board then you don't need this module. The
102
- ST-LINK will double as a USB<->serial converter connected to the microcontroller USART1 at pins PC4 and PC5.
103
-
104
- ## The Bluetooth module
105
-
106
- <p align =" center " >
107
- <img title =" The HC-05 Bluetooth module " src =" ../assets/bluetooth.jpg " >
108
- </p >
109
-
110
- This module has the exact same purpose as the serial module but it sends the data over Bluetooth
111
- instead of over USB.
0 commit comments