???????? ???? ?????? ?????? ????????????????? ?????? ???????? ???? ???????????????/????????????????????????????? ???????
Mostafa Elshiekh
Embedded SW Engineer @ Scalvy Inc | AUTOSAR | OSEK | RTOS | BSW | NVM | CCP | Vehicle CAN | TI Microcontroller | ARM | Instructor@learn in depth | Content Creator
--???? ??? SPI ? ??????? ???? ?
-???? ?? ?? configurations ?????? ?
-???? ?? Master ???? ?? device ?? ?? slave ???? ?? ???? ?????? ??? ?? bus?
--,??? ?????? ???? ?? Slave ???? ?????? data ?? ?? master ?
-???????? ?? ??? ?
--???? ??? ?? ?? UART ?
--???? ????? ??? ?? ??? ???? ?????? ??? ?? UART ?? ?? I2C ? -??? ?? advantages ???? ?????? ???? ?? ???? ?
-??? ?? disadvantages ?????? ?
--???? ??? QUAD SPI ?
--??? ???? ????? ????? ECUs ?? ??????? ?? ??????? ??????? ? SPI bus ?
--???? ???? ?? Slave ???? ???? ???? ?? Master ?????? ?? ?? Master ????? ???? ????? ?? slave ??????? ?? ?? generate ??? clock ????? ?
/*********************/
???????? ???? ?????? ?????????????????
SPI is a common communication protocol used by many different devices. For example, SD card reader modules, RFID card reader modules, and 2.4 GHz wireless transmitter/receivers all use SPI to communicate with microcontrollers.
One unique benefit of SPI is the fact that data can be transferred without interruption. Any number of bits can be sent or received in a continuous stream. With I2C and UART, data is sent in packets, limited to a specific number of bits. Start and stop conditions define the beginning and end of each packet, so the data is interrupted during transmission.
-- SPI (Serial peripheral Interface)
-- SPI is a serial protocol
-- SPI bus was originally started by Motorola.
--synchronous data transfer
--Full-duplex
--Single Master / multi slave
--Multiple slave devices are supported through selection with individual slave select (SS) lines.
--It can be used to communicate with a serial peripheral device like external EEPROM or with another microcontroller with an SPI interface.
-- ?? synchronous ???? ??? ?????? ???? ?? ???? ?? ??? shared clock ??? ?? master ??? slave.
--???? ?? full duplex ???? ??? full duplex ???? ???? two separate line ???? ???? ???? ????? ???? ?????? ???? ???? ??? ??? full ??? ???? ????? half duplex ??? ??? ???? ???? ??????? ??? ??? ?? wire ??? ??? ???? ????? ???? ?????? initialization.
--???? ?? single master/ multi slave
???? ?? master ???? ???? ????? ??? ?? bus ?? ??? ? ?? ?? ???? ?? ?? slaves.
--???? ?? ?? ???? ??? master ?? ?????? ?? ?
--?? ?? ??? ?? ????? ?? ?? SPI ?? synchronous ? ???? ??? clock ????? ???? share ??? ?? Master ??? slave ?? ! ??
??? ??? ??? ???? ????? generation ?? clock ?? ?
??? ???? ?? clock ????? ?? slave select ???? ???? ?? ???? ???? ??? slave ? ???? ???? ????? ????? ??? ???? ??? ??? ???? ???? ?? clock ?
???? ????? ?? ?? ?? ?? master ?? ???
????? ???? ?? ?? slave ?????? ???? ??? ???? ???? ?? ???? ?? master ?? ?????? ???? ??? ????
??? ?
??? ???? ??? ?? ??? ?? spi ?? synchronous ???? ???? ?????? ????? ????? share ?? clock ??? ?? master ??? slave ?????? ?? ????? ?? ?? ???? master ?? ?? ?? ???? ????? generation ?? clock ???? ?? ?????? ?? slave ???? ???? ?? ???? ??? ?? master ?? ???? ?? master ?? ???? ??? ???? generation ?? clock ????? ?? ?????? ?? ??? ?????
?????? ??? ???? ????? ?? ??? ?? ???.
/**********************/
?????? ???????? ?????? ?????? ???????????????? ?????? ???????????????????? ???????? ?
--SPI consists of two shift registers, one in the master and the other in the slave side.
--Also, there is a clock generator in the master side that generates the clock for the shift registers.
--?? SPI peripheral ?? ?? micro ?????? ??? shift register ..?? master ????? ??? ???? ???? ???? ?? data ???? ?? ???? ?????? ??? Slave ???? ??? ?????? ???? ?? ????????? ?? ?????.
--???? ?? ???? ?? master ?? ?? ???? ????? generation ?? clock ???????? ?? ???? ?? clk wire ????? ?? Slaves ?? ?????? ?? Slave ???? ?? ????? ?? Slave select ??????.
--The serial-out pin of the master shift register is connected to the serial-in pin of the
slave shift register by MOSI (Master Out Slave In).
--The serial-in pin of the master shift register is connected to the serial-out pin of the
slave shift register by MISO (Master In Slave Out).
--?? SPI ?? ???? serial protocol ????? ??? pins ...?? ??? ??? ?? pins ????? ?? SPI ?
1-MOSI (Master Out Slave Input.)
--??? ?? PIN ???? ?? Master ????? ????? ?????? (out) ???????? ????? ?? Slave (input).
2-MISO(Master Input Slave Out)
--??? ?? PIN ???? ?? Master ??????? ????? ?????? (Input) ????? ????? ?? SLAVE (out).
3-Slave select
--The master determines which chip it is talking to by the CS lines.
4-CLK
The clock signal synchronizes the output of data bits from the master to the sampling of bits by the slave. One bit of data is transferred in each clock cycle, so the speed of data transfer is determined by the frequency of the clock signal. SPI communication is always initiated by the master since the master configures and generates the clock signal.
--The master clock generator provides a clock to the shift registers in both the master and slave.
--SPI master provides clock signal (SCLK) to SPI slaves.
--?? ??? ?? ??? ?? pin ??????? ???? ?????? ????? ????? generation ?? ?? Master ?? clock ?????.
--The clock input of the shift registers can be falling- or rising-edge triggered.
Shift registers are 8 bits long. So after 8 clock pulses, the contents of the two shift registers are interchanged.
--When the master wants to send a byte of data, it places the byte in its shift register and generates 8 clock pulses.
--After 8 clock pulses, the byte is transmitted to the other shift register.
--When the master wants to receive a byte of data, the slave side should place the byte in its shift register, and after 8 clock pulses the data will be received by the master shift register.
--??? ?? SPI ?? frameless ??????? ?? ?? ??? ???? ???? ??? ??? Frameless ??? ???? ?????? ??? ?? Wire ?? ???? ????? ?? ???? ?? bits ????? ?????? ?? ?? ??? ?????? ????? ?????? ??? ??? 8 cycles ?? ????? ??? 1 byte ?? ?????? 1 byte.
--It must be noted that SPI is full duplex, meaning that it sends and receives data at the same time.
--For the slaves that are not being talked to, the data output goes to a Hi Z state.
-- ?????? ??? ?? ??? ?? ??? ?
?? ????? ?? ?? SPI ?? single master/ multi slave
??? ????? ?? Master ??? ??? ???? ?? data ???? ???? ?? ???? ?????? ? Slave 0 ??? 1 ??? 2 ???...
??? ???? ?? ????? broadcast ????? ???? ?? ???? ?? Master
???? ??? ??? ???? ???? slave ???? ????? ??? ?? bus
???? ?? slave ?? ??? ???? ?
??? ?? ???? ???? ?? mosi ??? miso ?????? ??????? ??? ?? slaves ???? ??? ?? bus ???? ???? factor ??? ???? ?? master ????? ???!
?? ?? ??? ?? ???? ?? pin ??????? ??? ?? Slave Select ?? ?? Chip Select ???? ????
?? ?? ??? ?? Master ???? ???? ???? ???? ???? ????? ?????..??? ??? ?
??-???????? ?????? ?????????? ???????????? ??????? ?????? ?????? ?????????? ?????????? ???? ???????? ???????? ?????? ???????? ???? ????.
??-?????????? ?????? ?????????? ???????????????????? ???? ?????? ?????? ??????
??? ??????? ?? ??? :
1- ??? ???? ?? slave select ????? ?? slave ???? ??? ???? ????? ?????? ? low
???? ?? slave select ?? ???? ??? ????? ??? ???? ???? ??? ??????? ?? ???? ?? Slaves ???? ?????? ??? ?? bus ?????? ??? pins ????? ?? ?? master ????? ?? slaves ???? ??? ?? ????? ?? spi ????? ??? pin ????? 3+ n
??? ?? ?? n : ?? ??? ?? Slaves ???? ?????? ??? ?? bus ????? ?????? ????? ?? ?? spi ???? ????? ???? ??????? ?? ?? slaves ??? ?? bus ??? ??? ?? ???? slave ????? ??? ?? ?? slave select ?? ???? ???? ?? slaves ????? pins ???? ????? ?? ?? ????????? ??? ???? ?? ????? ???? ?? gpio pins ???? ???? ?? ?? micro ???? ???? ??????? ??? ???? input ????? ?? default ?????? ? high ???? ???? ???? ?? slave ???? ??? ????? ???? ?????? ? low.
????? ?? slave ???? ??? ? ?? slave select ?????? ?????? ? low ??? ????? ??? ?? bus ?? ???? floating input ???? ?? 2 wire ???? ?? mosi ??? miso ??????? ??? Open circuit.
-??? ????? ?? ?? ???? ???? ? 20 slave ?? ?? spi ????? ?????? 20 slave select ?
-????? ?? ???? ?? ????? ???? ?? ?? ? peripheral ???? ??? ??? ????? ? ???? ?? pins ????? ?? gpio.
2- ????? ?????? ?? ?? ?? Master ???? generation ?? clock ??? ?? wire ?????? ???? ??? ?? Master ???? ???? slave ???? ???? ???? ?????? ???? ?? clock ????? ?? slave select ????? ?? slave ?? ? zero ?????? ?? slave ??? ? communication ????.
--???? ?? master ??? ????? slave select ????? ?? Slave ???? ?? ???? ????? ???? ?? Slaves ????? ?? ??? ?? bus ???? ????? ?? MOSI / MISO ???? high impedance ?????? open circuit?
/**********************/
???????? ???? ?????? ?????????????????????? ?????????? ???? ?????? ?
--Sensors
--LCDs
--Control Device
--Flash Memory
--?????? ?? ??? ??? ?? sensors ?? interface ????? SPI
?? ???? ?? ?? SPI ???? ???? frameless ??? ????? ?????? ??? ?????? ???????? ?? ???? ???? ?? I2C ?? ?? UART ??? ??? ???????? ??? ?
?? ???? ????? ???? ??? Frame less ????? ?????? ????? ???????? ??? ?
?? frame less ???? ?? ??? ???? ???? ?????? ??? ?? wire ????? ???? ?? ?? ????? ?? ???? ???? ?? ?? ?? uart ???? ????? ?? ???
1-Start bit
--?? RX ????? idle ? 1 ???? ?? ????? ?????? ??? ????? ????? ????? logic high ??? ? ??????? ??? ???? ??? ???? ??????? ?????? ???? ????? ??? ????? ???? ???.
2-data field
?? Data field ?? ?? UART ????? ?? 5 ? 9 bit ?? ?? field ?? ????? ?????? ???? ???? ?????? ?????? ?? ??????? ????? ??????? ??????
3-parity bits
--The parity bit is added to make the number of 1’s even (even parity) or odd (odd parity).
--This bit can be used by the receiver to check for transmission errors.
??? ? ??? ???? ??uart ?????? ?? frame ??? ????? ?? i2c
--??? ?? ?? SPI ?? Frameless ??? ???? ?????? ???? ???? ????? ???:
领英推荐
1-???? ???? farm ??? ?? bits ???? ?????? ?? data ?? ???? ?? bits ????? ??? ?? Frame ??? ??? ?? throughput
?? ???? ??? throughput
/*********************/
???????? ???? ?????? ???????????????????? ?
--it is the effective data bit / total bits which i send
--???? ??? ?
--?? throughput ?? ?????? ??????? ?? ?????? ??????? ??? ???? ??? ???? ?????? ???? ??? ??? ???? ??? ?? 'A' ???? ???????? ?? uart ???? ?? ?????? ?? 8 bit ??????? ??? ?? ?????? ?????? ??? ???? ??? ?????? ???? ????
--?? ?? ?? ?????? ????? ? ?? ???? ?? ????? ?? ?? fails ???? ?????? ??? ???? ????? ? ?? frame ???? ????? ??? ?? ???? ???? ???? ???? ?? ???? ????? ??? ?? ???? ?? uart ?? ?? start bit ??? parity ??? stop bits
--??? throughput ?? ??? ?????? ???? ??? ???? ?????? ???? ?????? ??? ?? ?? bits ???? ??? ??????? ???? ?? ?? bits ????? ?????? ????? ????? ?? bits ???? ???? ?? ?? frame ??? ???.
--???? ??? ?? ?? ??? ????? 8 bit ???? ?? effective data ????? ????? ????? start ????? stop ????? ??? ?? parity ? 0 ???? ?? 8 bit ???? ????? 2 ?????.
--???? ?? throughput = 8/10 ???? 80% ?? ???? ??? ?? ???? ????? parity ?????? stop ???? ?????? ???? ???? ? 60% ???? ?? throughput ???? ???? ???? 60000 bit ???? ???? ????? 40000 bits ????? ???? ???? ????? FRAME
????? ??? ?? throughput ???? ?? SPI 100% ??? ?? effective data ?? ???? ?????? ?? ?????? ???? ?????.
??? ???? ???? ??? ????? ? 480 M bits / sec.
?????? ??????? ???? ??? ?????? ?? ???? frameless
2- ??? ???? ???? ??? its your frame
???? ??? ?
?? ?? SPI ??? ???? ???? ????? ??? frame ??? ??? ???? ????? ??? ???? ???? ???? ???? ??? byte ????? ?? ?? ID ???? ?? slave ?? ?? ECU ???? ???? ?????? ??? byte ???? ???? ???? ?? transaction ???? ???? ????? read/write ????? ???? ???? ?? data ???? ?? data ??? ack ??? ? ??? ???? ???? ??? frameless ???? ???? ??? ???? ???? ?? ???? frame ??? ??? ???.
/*************************/
--?? ???? ???? ???? ??? ????? frame ???? ?? ???? ???? parity ?? checksum ?? ?? ??? ?? ????? ?? check ?? ??? ????? ?? ?? data ??? ?? ????? ???? ?? ???? ?? ???.
??? ???? ??? ?? SPI ??? ????? ?????? ?? ???? ???? ????? ??? ?? bus ?? ???? 10 cm ??? ???? ??? ???? ?? ?????? ???? ?? ?? noise ???? ?????? ???????? ????? ??? ????? ???? ???? ??????? ?? ?????? ?? ???? ????? ?? noise ??? ?? ???? ????
/************/
??? ?????? ???? ?? ?? circuit ?? ??? ?????? ?? ??? ?
?? ?? ??? ?? circuit ?????? simple ??? ????? register ??? ?? master ???? ??? ?? slave ???????? ???? ????? ?? clock ???? ??? ??? ?????? ???? ???? ?????? ?? ?? register ???? ???? ??? ?? master ??? ????? ??? ?? ?? ?? clock ?? cycle ???? one bit ??????? ??????? ??????? ???????? ????? ?? ?? register ?? ?? buffer ???? ???? ??.
/***********/
???????? ?????? ?????? ?????????????????????
1-SPI is frameless so ( high speed + customized frame)
2-Separate MISO and MOSI lines, so data can be sent and received at the same time
3- throughput is 100%
4- Simple circuit
5- Support Multiple slaves
6-Lower power requirement than I2C
7-No complicated slave addressing system like I2C
/***********/
???????? ?????? ?????? ???????????????????????????
1- Requires more pins
2-Master must control all communications (slave can't generates transaction)
3- Separate SS line
4-No flow control
5-No acknowledgment that the data has been successfully received (I2C has this)
6-No form of error checking like the parity bit in UART.
--?????? ??? ?? ???
1- ?? ? ??? ???? ?? ?? slave ?????? slave select pin ???? ?? ???? ?? slave ??? ??? ?? pins ????? ?? ?? ?? i2c ?? ?? can ???? ??? 2 wire ??? ?? ECUs ???? ?? ?? slave ???? pin ???? ???? ???? ??? ???? ???? ??? ?? ??????.
2-?? master ?? ???? ????? ?? ????? ????? ???? ?? ???? ????? ???? ?? slave ???? ???? ??? ???? ???? ?? ???? ?? slave ????? ???? ???? ? ?? ???? ????
(????? ?? ??? ???? ?? ??? ??? ???)
????? ?? ?? slave ?? ???? data ???? ?????? ?? master ????? ???? ?? ???? ???? ???? ?? Master ??? ???? data ????? ????? ?????? ??? ?? slave ????? ????? ???? ????? generate ?? clock ?? ?? master ?????? ?? ???? ????? ???? ???? ???? ???? ?????? ???? ?? clock ????? ?? pin ????? ?? ss ?? high ? low
???? ? master ????? ???? ????? ??????? ???? ???? ?? ??? ????? ??? ???? ??? master ??? ????? ?? ???? ???? ??????
???? ?? ??? ?????? ???? ?? critical system ????? ????? ???? ??? ?? ?? ?? master ???? ???? data ???? ????? ????? ?? master ????? ????? ?? slave ?? ????? ???? ??? ???? ????? ??? ??? ?? slave ???????? ????? ?? ?????
???? ?????? ???? ?? slave ??????? frames ????? camera ?? ??????? ????? ?????? ?????? ?? slave ???? ??data ?? ?? master ?? ???? ?? spi ??? master ?? ???? ???? ?? action ?? ??????? ?????? ???? ?? ????? alarm ?? ??? ???? ???? ??? ?? ?
--?? ???? ??? ???? ?? system ???????? ??? ?? slave ???? ???? ???? ????? ????? ???? ??? ???? ?? ????? ?? master ??? ??? ?? ????? ?
--???? ??? ????? ?? ??? ????? ?? ??? ??????? ???? ?? ??? ???? ?? ????? ? design
?? ??? ????? ???? ?? ?????? ?? ?? slave ?? master ???? ?? critical ????? ????? ???? ?? ???? ???? ???? ??? ? ?? master ???? ??? ?????? ???? ???? ?? ???? ??? period check ?? ?? master ???? ???? ??? ?? slave ?? ???? ?? ???? ????.
--??? ?? ?? ??? ?? ????? master ???? ? slave ???? ?? ??? ???? ???? ??????? slave select pins ??? ?
-- ???? ???? ???? ?? ??? ????? ?? ?? slave select ???? ?? master ????? ?? slave ???? ?? ???? ?????? ? ?????? ??? ???? ???? ???? slave ???? ???? ???? ?? clk ????? ?? ss ????? ?? slave ???? ???? ????? ? low ?? ? ????? ???? ?? CLK
?? ? ?? master/slave ????? ?? ???? ???? ?? ss ????? ?? slave ? low ??? ??? ???? ?????? ? gnd ???? ??? ???? ?? ???? ?? slave ?? ????? ???? ???? ???? ??? ?? depend ??? ???? ???? ?? ??? ??? ? master ???? ?? clk ?? ???? ??? ?????? ?????? ???? ???? ??? ???? ?? ss ? gnd.
/***************/
??? ???? ?????? ?? SPI ?? ?? ?
--SPI with flash memory
--Most SPI flash memories have a write status register command that writes one or two bytes of data.
--To write to the status register, the SPI host first enables the slave select line for the current device. The master then outputs the appropriate instruction followed by two data bytes.
--??? ?? ??? ???????? ???????? ??? frameless ????? ???? ???? our own frame ???? ???? ?? flash memory ?? ?????? ?????? ?? ?? microcontroller ?? ??? ??? ??? ?????? ????
???? ???? ?? datasheet ????? ?? flash ?? ????? ???? ?????? ?? ???? ???? ??? ???? ???? ?? ?????? ?? ????? ??? ???? instruction ???? ??? ????? 0x08 ?? ??? ??? ????? ??? byte ??? ?????? ????? ??? ???? ???? ??? ??? ????? ???? ?????? ?? address ???? ?????? ???? ???? ???? ???? ??? ??? ???? ?????? ???? ???? ?????? ???? ?? ????? ?????? ??? ???? ???? ?????? ????? ??? ??? ??? ???? instruction ??????? address ??????? ?? ?????? ???? ???? ??????.
--?? ?? ???? ???? ???? ??? ?
???? ???? ??? byte ????? 0x04 ??? instruction ?????? ?????? ?? ?? ?? ????? ?? ??? byte ???? ?? ??? ?? read ????? ??? ???? ?? clk ????? ?? slave select ? low ???? ??? ?? wire ?????? ???? ?? MiSO ?????? ??? ??? ?????? ???? ??? ??? ??????.
/***********/
???? ?? ??? ?? ?????? ? mode ?? half duplex ???? ?????? ? 3 pins ?? ??
CLK
MOSI --- MISO
SS
GND
??? ?????? ?? ??? ????? ?? miso ??? mosi ????
??? ?? ??? ???? ??? ?? pins ?? ?? throughput ?? ???? ???? ????? ??????? ??? ??? ?? wire ??? ?? ??? ????? ????
/************/
???????? ???? ???????? ?????? ??
--Multi I/O variants such as dual I/O and quad I/O add additional data lines to the standard for increased throughput. This performance increase enables random access and direct program execution from flash memory (execute-in-place).
--A multi I/O SPI device is capable of supporting increased bandwidth or throughput from a single device.
--?? ???? ?? ??? ??? ????? ???? ??? ?? pins ???? ???? ???? ??????? ?? ?????
???? ?? ?? half duplex ??? ????? ???? pin ???? ?? ???? ?? ?????? ?? ?????(?? ?? ?? ??? ????? ????)
???? ?? ?????? ????? ?????? ?????? ??????????(?? ???? ?? ?? ??? ????? ???? half)
?????? 4 pins ???? ??????? ?? ????? ????? ?????? ?? ?? ??? ?? flash memory ????? ????????? ?????? ??? ???? ??? ???? 4 shift register ???? ???? ???? ?? ???? ?? ???? ????? ?????? ?? ?????? ??.
--???? ?????? dual SPI
--??? ???? ?????? ?? ?? quad ?? ?? ??? 2 pins ??
MOSI
MISO
???? ???? ??????? ?? ????? ?? ???? ?? pin ?? ????? ??????? ?? ??? ????? ??.
/**************/
??? ??? ???? ??? ??? ???? ???? ?????? ????? ECUs ?? ??????? ??????? ??? SPI ?
--? ? ?????
1-?? ???? ????? ??? frameless !
??? ??? ????? ?? Field ????? ?? security ?? ??? check ?? ?????? ?? ?? ?? ??? ???? ????? ??? ???? ?? ?? master ??? ?? ???? ?? ????? check sum ??? ??? CRC ??? ??? parity ??? ??? ???? ??? ????? ?? ??????? ?????? ???? ????? ??
2- ????? ?????? ?? ????? ????? master/slave ??? SPI ????? ?? ???? 10 cm ?? ???? ??? ??? ???? ????? ??????? ?? ??????? ?? ?? zone ??? zone ????? ???????? ????? ???? ???? ? ????? ??? ????? ???! ?? ????? ????.
3- ?? SPI ?? Single master multiple slave ?????? ?? ?? slave ????? ???? ?? ???? ????? ?? master ?? ???? ??? ????? ?? ???? ???? ?????? ??? ?? master ?? ???? ?? generate ?? clock.
/**************/
--??? ??? ?? ???? ????? ?? ????
?? master ?? ???? ????? ?? ????? ????? ???? ?? ???? ????? ???? ?? slave ???? ???? ??? ???? ???? ?? ???? ?? slave ????? ???? ???? ? ?? ???? ????
????? ?? ?? slave ?? ???? data ???? ?????? ?? master ????? ???? ?? ???? ???? ???? ?? Master ??? ???? data ????? ????? ?????? ??? ?? slave ????? ????? ???? ????? generate ?? clock ?? ?? master ?????? ?? ???? ????? ???? ???? ???? ???? ?????? ???? ?? clock ????? ?? pin ????? ?? ss ?? high ? low ?? ?
--??? ?? ?? slave ??? ???? ???? ??????? ????? ???? ?????? ????? ?? ????? ?? master ??? ???? ?
--??? ???? ?????? ????? ????? ?????? ?? ??? ???? ???? ???? ??? ?? ?? ?????? ?? ?? Spi ? peripheral ?? ???? ?????? ?????? ????? ??????
--?? ?? ?????? ?? ??? ?? slave ??? ???? ???? ????? ?????? ?? master ???? ??? ????? ??? ??????? micro ?? ???? ?? spi ?? ????? ?????? ???????? ?? ?? ?? slave ???? ???? ?? master ??? ???? ???? ????? ????? generation ?? clock ????? ?? Slave select ?????? ?? high ? low ???? ???? ??????
--?? ???? ???? ?? ??? ?? slave ???? ? Configure pin ???? output ??????? ??? master ??? external interrupt pin? ???? ?? Slave ???? ???? ???? ???? ?????? ???? ????? ?????? ?? master ??? ??? ???? ?? pin ?? ? high ????? ??? ?? mater ??????? ?? ?? ISR ???? ?? EXTI? ??? ?? ?? ??? rising edge ??? ?? external interrupt pin ?? ?? ?? master ????? ? generate clock ????? ?? Slave select ????? ?? Slave ?? ????? ????? ???? ?? slave ?? ???? ???? ???? ????? ?????? ???? ????? ?????? ?? master ??? ??? ????? ?? ????? ???.
/**********************/
---???? ???????? ???? ?????? ??? ?????? ?????? ????? ?? ???? ?? ?????? ???? ???? ???? ????? ?????? ????? ???? ??????? ???? ?????? ???? ????.
---???? ?????? ?? ??????? ???? ??? ??? ??? ??????? ?? #elshiekh_embedded ??? #shiekh_elembedded ???? ??? ?? ??? ?????.
---????? ?? ???? ???? ?????? ?????? + ??? ???? ???? ??? ?? ??? ???? ????
/********************