The microcontroller can boot in different modes, similar to how you can enter the BIOS when booting your PC by pressing the F2-key (or other F-key). This can save you in tricky situations, for example if you are playing with the main clock or with sleep modes and it crashes, making you unable to upload (flash) a new binary to the microcontroller. You can boot in "safe mode" by pulling this pin high (so it does not run you code on startup) allowing you to upload a new binary even if your code would otherwise brick your MCU.
- Add a 10k pull-down resistor to the BOOT0 pin.
- Add a "jumper" between BOOT0 and +3.3v, so that you can easily boot into "safe mode" by shorting these two terminals. You could make this a 3-pin header and "no-connect" the third terminal in order to provide a place to store the jumper when not in use.
The crystal will resonate at a specified frequency. Its waveform will be used as an input to the PLL (Phase Locked Loop) that will multiply the crystal’s frequency. This is the crystal that will be used: https://www.elfa.se/sv/kristall-ytmontering-16mhz-iqd-lfxtal029370/p/30131284
...
...
@@ -112,7 +112,7 @@ where `Cload` is the load capacitance value specified in the crystal's [datashee
- Connect the component with wires to the mentioned pins. Value 16MHz.
- Connect one 22pF capacitor to each pin on the crystal and connect the other end of the capacitors to GND.
To program and debug the MCU we will use a SWD connector (6 pin header). Sometimes it can be tricky to find all the information in the datasheet and user manual for the microcontroller, all the information you need is there, it will just take time to find it. However, it can then be useful to follow proven examples like your Nucleo board. This is the type of connector that will be used: https://www.elfa.se/en/straight-male-pcb-header-through-hole-rows-contacts-54mm-pitch-rnd-connect-rnd-205-00627/p/30093647
...
...
@@ -122,20 +122,20 @@ To program and debug the MCU we will use a SWD connector (6 pin header). Sometim
- You can connect pins without wires going everywhere. Use ”net labels” (button to the right) to name one wire. It will connect all wires with the same name in the local sheet.
### 8) <span style="color: green;"> Power from USB *Done* </span>
One easy way to get power to your project is through USB. It can deliver up to 100mA without any negotiations.
- Add a ”USBOTG” connector to your schematic. Already here you can think about how you should connect your mouse and use a suitable connector (mini, micro or even usb-c).
- Find the USB pinout for your connector.
### 9) 3.3V Power Supply
### 9) <span style="color: green;"> 3.3V Power Supply *Done* </span>
The MCU wants to be powered from a 3.3V rail. To this end we will use a fixed LDO (low dropout) linear regulator, to convert a 5V input (from the USB connector) to a 3.3V output. We will use the [AP2125N-3.3TRG1](https://www.elfa.se/en/ldo-voltage-regulator-3v-360ma-sot-23-diodes-incorporated-ap2125n-3trg1/p/30041163) for this.
Look in the [datasheet](https://www.elfa.se/Web/Downloads/_t/ds/AP2125_eng_tds.pdf) for a typical application circuit. Later we will design the power supply for the PWM3389 sensor, which is a bit trickier.
### 10) PWM3389DM-T3QU Schematic Symbol
### 10) <span style="color: green;"> PWM3389DM-T3QU Schematic Symbol *Done* </span>
Download the general [datasheet](https://www.pixart.com/products-detail/4/PMW3389DM-T3QU), and look at section 3. There you will find a reference schematic.
...
...
@@ -151,7 +151,8 @@ For some components (like the PMW3389DM-T3QU) there might not exist a pre-made l
Hint. Never, never ever, change the grid settings when placing the pins in the symbol.
### 11) 1.9V Power Supply
### 11) <span style="color: green;"> 1.9V Power Supply *Done* </span>
<spanstyle="color: red;"> Need to figure out R1 and R2 </span>
As you can see in the PWM3389DM-T3QU datasheet and reference schematics, the sensor requires a 1.9v power supply. This is a much less common voltage for a fixed output LDO (try finding one from Elfa or rs-online and you will likely fail).