Skip to content

Commit

Permalink
Merge pull request #812 from PythonHacker24/PythonHacker24
Browse files Browse the repository at this point in the history
Basic Information updated in spi.md in Hardware Hacking
  • Loading branch information
carlospolop authored Mar 11, 2024
2 parents dc26032 + 774f661 commit 93d8d71
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions todo/hardware-hacking/spi.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ Other ways to support HackTricks:

# Basic Information

SPI (Serial Peripheral Interface) is an Synchronous Serial Communication Protocol used in embedded systems for short distance communication between ICs (Integrated Circuits). SPI Communication Protocol makes use of the master-slave architecture which is orchastrated by the Clock and Chip Select Signal. A master-slave architecture consists of a master (usually a microprocessor) that manages external peripherals like EEPROM, sensors, control devices, etc. which are considered to be the slaves.

Multiple slaves can be connected to a master but slaves can't communicate with each other. Slaves are administrated by two pins, clock and chip select. As SPI is an synchronous communication protocol, the input and output pins follow the clock signals. The chip select is used by the master to select a slave and interact with it. When the chip select is high, the slave device is not selected whereas when it's low, the chip has been selected and the master would be interacting with the slave.

The MOSI (Master Out, Slave In) and MISO (Master In, Slave Out) are responsible for data sending and recieving data. Data is sent to the slave device through the MOSI pin while the chip select is held low. The input data contains instructions, memory addresses or data as per the datasheet of the slave device vendor. Upon a valid input, the MISO pin is responsible for transmitting data to the master. The output data is sent exactly at the next clock cycle after the input ends. The MISO pins transmits data till the data is fully transmitter or the master sets the chip select pin high (in that case, the slave would stop transmitting and master would not listen after that clock cycle).

# Dump Flash

## Bus Pirate + flashrom
Expand Down

0 comments on commit 93d8d71

Please sign in to comment.