11-12

\documentclass[UTF8]{ctexart}

%\documentclass{article}

\ Title {2019 Nian 10 Yue 23 Ri --- {\ today}} practice summary

\ Author {} Lei Yi Shan

\usepackage[utf8]{inputenc}

\usepackage{ctex}

\date{\today}

\usepackage{geometry}

\geometry{a4paper,left=1cm,right=2cm,top=2cm,bottom=1cm}

\usepackage{graphicx}

\usepackage[breaklinks,colorlinks,linkcolor=black,citecolor=black,urlcolor=black]{hyperref}

\begin{document}

\ Maketitle

\tableofcontents\

 

\ Section {23 October}

\ Subsection {keil software installed, st-link drive}

\ Subsection {Apollo program board is only burn F429 routine}

\ Subsection {keil serial download can only open one, or serial port is occupied}

\ Subsection {} learning type structure configuration

\includegraphics[scale=0.6]{struct.png}

\ Subsection {} learn basic operations bit operation

\ Subsection {eg 1 \ textless \ textless3 mean left by 3 bits to 1, the right 0s to give 1 * 2 * 2 * 2 = 8}

\ Subparagraph {int m = 1 \ textless \ textless3; // binary form: 1 and 1000}

 

\ Section {24 October}

\ Subsection {inc, arc, mise.c} File Meaning

\ Subparagraph {inc was inside peripheral header file, src was inside the library function source file, the file is interrupted mise.c}

\ Subsection {learned GPIO common library functions}

\ Subparagraph {I / O pins may be provided in a variety of different software functions, such as input or output, so called GPIO (General-purpose I / O). GPIO pin and has been divided into different GPIOA, GPIOB, GPIOG groups, each port is divided into 0 to 15}

\ GPIO function of three parameters {} subsection

\begin{center}

\includegraphics[scale=0.8]{gpio.png}

\end{center}

\ Subsection {port}

\ Subparagraph {concept of serial communication (Serial Communications) is very simple, serial bitwise (bit) communication system for transmitting and receiving bytes

The serial interface may be a parallel data received from the CPU converts character sent as a continuous stream of serial data, converting serial data stream can be received while the device is supplied to the CPU of the parallel data characters. String can turn and, parallel and serial}

\ Subsection {serial port initialization}

\begin{center}

\includegraphics[scale=0.6]{uart_init.png}

\end{center}

 

\ Section {25 October}

\ Subsection {using serial assistant function printf to print the inside is because the header file called usart.h}

\includegraphics[scale=0.5]{usart_able.png}

\ Subsection {keil not use Chinese comments}

\includegraphics[scale=0.6]{mess_code.png}

\ Subparagraph {click edit, find the configuration lowermost, the Editor page, you can see there is a Encoding below the General Editor Setting, there are a lot of options, select Chinese GB2312 (Simplified). Click OK to enter the Chinese comments}

\ Subsection {Note To debug serial data bits must be eight characters can be received, or is garbled}

\includegraphics[scale=0.6]{tiaoshi.png}

\ Subsection {timer experiment, while 0 flash only once and is not recirculated}

\includegraphics[scale=0.5]{only_one.png}

\ Subsection {View pin pin multiplexing, search for alternate function}

\includegraphics[scale=0.5]{alternate.png}

\ Section {26 October}

\ Subsection {Keil can not expand HALLIB inside .c file inside the .h file}

\includegraphics[scale=0.5]{build.png}

\ Subparagraph {} re-build look like

\ Subsection {keils files disappear}

\includegraphics[scale=0.5]{filehide.png}

\ Section {Oct. 26 - Nov. 1}

\ Subsection {volume, accuracy, price indicators to find three modules pm2.5}

\ Subparagraph {Comparative six pm2.5 module finalized sps30}

\ Subsection {sps30 carefully read the important parameters}

\ Section {sps30 important parameters}

\subsection{working principle}

\subparagraph{Laser scattering}

\subsection{life span}

\subparagraph{More than eight years}

\subsection{size}

\subparagraph{41 x 41 x 12 mm}

\subsection{Important parameters}

\begin{center}

\begin{tabular}{ p{5cm} p{2cm}p{2cm}p{5cm}p{1cm}}

\hline

parameter & value & unit & Remarks \\

\hline

voltage& 4.5-5&V & -- \\

Idle current & <8 & mA & Idle mode \\

Average current & 60 & mA & -- \\

Precision & $\pm$ 10 & ug/m & 0-100ug/ m \\

concentration & $\pm$ 10 & $\%$ & 100-1000ug/ m \\

I/Opin (RX/SDA,TX/SCL) & -0.3-5.5 & V & \\

max IO pin current & 16 & mA & \\\hline

\end{tabular}

\end{center}

\subsection{Pin parameter}

\begin{center}

\begin{tabular}{ p{1cm} p{2cm}p{5cm}p{6cm}p{1cm}}

\hline

pin & name & description & remark \\

1 & VDD &Support voltage & 5V $\pm$ 10$\%$ \\

2 & RX & UART Communication acceptance pin & TTL 5V and LVTTL 3.3V compatible \\

& SDA & I2CSerial data output pin & TTL 5V and LVTTL 3.3V compatible \\

3 & TX & UART Communication transmit pin & TTL 5V and LVTTL 3.3V compatible \\

& SCL & I2C Serial clock input & TTL 5V and LVTTL 3.3Vcomatible \\

4 & SEL & Interface selection & Floating mode selsection UART \\&&&Grounding mode selection I2C \\

5 & GND & Grounding mode selection & -- \\

\hline

\end{tabular}

\end{center}

 

 

 

 

 

 

 

\subsection{ Typical UART application circuit.}

 

\subparagraph{Both SCL and SDA lines are open drain I/Os. They should be connected to external pull-up resistors (e.g. Rp = 10 $ \Omega $).}

 

\subparagraph{in order to correctly select I2C as interface, the interface select (SEL) pin must be pulled to GND before or at the same time the sensor is powered up.}

 

\begin{center}

 

\includegraphics[scale=0.6]{uart.png}

 

\subsection{Set Pointer Read Data}

 

\subsection{Set Pointer Write Data}

 

\subsection{Checksum Calculation}

 

\subsection{I 2 C Commands}

 

\subsection{Read Measured Values}

 

\end{center}

 

 

 

\ Section {November 1}

\ Subsection {u32 cast into 8-bit bytes of 32 bits}

\includegraphics[scale=0.8]{u32trans.png}

\ Subparagraph {SCB- \ textgreater AIRCR a whole, is a structure element of SCB address is equal 0x05FA0000}

\ Subsection {MODER, OSPEEDR, PURDR, each of the two control registers an IO port}

\includegraphics[scale=0.4]{twocontrol.png}\\

\includegraphics[scale=0.5]{move11chen2.png}

\ Subparagraph {GPIO16 each register controls a group of pins, a so-called pin reflects the state value in the bit position of the translation of the translation operation, different values ​​for the translation state is determined, different translation positions different determinants pins}

\ Subsection {GPIO port function}

\includegraphics[scale=0.5]{pinsetfuc.png}

\ Subparagraph {BITx is noted that the test port is the port pinpos} detection program order

\ Subparagraph {is embedded with non-operational registers 0 and 1}

\ Subparagraph {multiplexing AF is a group of four, a total of 32-bit control register 8 IO, IO mode register is a set of control 2 16 IO}

 

\ Subsection {multiplexed state AF pin disposed}

\includegraphics[scale=0.5]{affuc.png}

\ Subparagraph {GPIO- \ textgreater AFR [1] is a structural body, - means that the inverted 12-bit register 4 all become 0}

\ Subparagraph {0x0f \ textless \ textless12 to 1111 is the upper 8 bits of 15 to 15 \ textless3} is equal to the position of pin11

\ Subparagraph {12 \ textless \ textless 12 AF is to make the first 12 to the multiplexing state SDIO pin 12 pin11}

 

\ {Library function AF pin multiplexed state} subsection

\includegraphics[scale=0.5]{AFFF.png}

\ Subparagraph {bit- \ textgreater \ textgreater 3 to packets, only 15-8,1111-1110, right 1}

\ Subparagraph {7-0,1110-0000 only, the right is 0, then divided into two groups AFR [0], AFR [1]}

\ Subparagraph {BITx \ & 0X07 packet, taking BITx = 0001 can verify the correctness of the formulas}

\ Subparagraph {BITx pin is bright position marks, may take only 0-15}

 

\ Subsection {interrupt, AIRCR write operation must be written to the keys 0xFA05 [31:16]}

\includegraphics[scale=0.4]{aircr.png}

\includegraphics[scale=0.5]{aircr-registers.png}\\

\includegraphics[scale=0.6]{aircrcode.png}

\ Subsection {interrupt enable, interrupt clear bit}

\includegraphics[scale=0.6]{NVIC_type.png}

\includegraphics[scale=0.4]{aircr-registers.png}

\ Subsection {NVIC-INIT function interrupt initialization}

\includegraphics[scale=0.6]{NVIC-INIT.png} \\

\includegraphics[scale=0.4]{IPRF.png}

\ Subparagraph {ISER [0], 0 --- 31 indicates interrupt ISER [1], represents 32 --- 63, 54 open to interrupt if interrupt: the first display 22 should ISER [1] in the position 1}

 

\ Section {} November 2

\ Subsection {} external interrupt timer EXTICR

\ Subparagraph {Different EXTICR GPIO port corresponding to the group, to find the corresponding control bits corresponding to EXTICR} GPIO

\ Subparagraph {EXTICR [0] is responsible No. 0--3 break, EXTICR [1]} break responsible No. 4-7

\ Subparagraph {of example with PB7, PB7 EXTICR 0001 in position on the mold 7 is equal to 3 4, and then just left by 4 to 12}

\subparagraph{.}

\includegraphics[scale=0.5]{PB7.png}

\ Subparagraph {7 die 4 is equal to 3, 4 and then by just left to a position 12}

\subparagraph{.}

\includegraphics[scale=0.5]{pb7add.png}

\ Subparagraph {example with Pb3}

\subparagraph{.}

\includegraphics[scale=0.5]{pb3.png} \\

 

\includegraphics[scale=0.5]{PB7.png}

 

\ Subsection {systick ctrl clock register bit determines whether the second external clock}

\includegraphics[scale=0.5]{external_clock.png}

\ Subsection {rcc cr register}

\includegraphics[scale=0.37]{rcc_rc.png}

\ Subsection {apb1enr register}

\includegraphics[scale=0.5]{apb1enr.png}

 

\ Section {} November 12

\ Subsection {sensirion shdlc function}

\includegraphics[scale=0.5]{sensirion_shdlc.png}

\subsection{sps30-measurement函数}

\includegraphics[scale=0.65]{sps30-measurement.png} \\

\ Subparagraph {get and set the corresponding read and write}

\ Subsection {pm2.5- main function}

Serial \\

\includegraphics[scale=0.65]{pm2dot5-main-func.png}

----------------\\

\\ particle detection fan cleanup

 

\includegraphics[scale=0.65]{probe-clean.png}

-\\

-\\

-\\

Start the measurement error function \\

 

\includegraphics[scale=0.65]{measure-error.png}

 

 

 

 

 

 

 

 

\end{document}

 

 

Guess you like

Origin www.cnblogs.com/china520/p/11844334.html