9.3 Program Frame Waveform
When performing Program, Verify or Authenticate actions, the data is clocked into the device starts at the beginning of the datastream block as shown in the following figure. This data is different depending on the device and the design, but in all cases, the data is clocked in 16 bytes at a time.
The following scope plots show how the first data frame is clocked.
In this example, the following data is clocked.
Bytes | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
7C | 5D | 1C | 2B | 3D | 75 | 19 | B3 | 92 | 4A | AB | EE | 4E | D5 | 6C | 62 |
Mode 3 of the SPI mode is used and the data is clocked byte 0 MSB first. Note the following:
- Before performing any data shift, the target device SPI buffer status is checked by shifting 0xff. This is the only instruction that is 8 bit long, and the data is read out at the same time as it is shifted in. The result of the first shift is ignored.
- When shifting data, into the device, the first byte is the command followed by 16 bytes of data. 16 bytes of zero value must be shifted for commands that do not require data.
- Shifting data out from the device is a two steps operation. The command is clocked into the device first and then the data is clocked out using a read command of 0x5.
- All operations except for SPI
hardware status check are made of one byte of command followed by 16 bytes of data.
Chip Select (CS) line must be driven low before clocking the command and should
remain low until the last bit of data is shifted in. Then, it must be driven high to
execute the loaded instruction.Note: 1, 2, and 3 are taken care of by the programming algorithm.
- Checking hardware status.
- Checking hardware status.
- Shift in the first frame. Command = 0x1. Data to follow. Note CS signal.
- Data Byte 0 = 0x7C
- Data Byte 1 = 0x5D
- Data Byte 2 = 0x1C
- Data Byte 3 = 0x2B
- Data Byte 4 = 0x3D
- Data Byte 5 = 0x75
- Data Byte 6 = 0x19
- Data Byte 7 = 0xB3
- Data Byte 8 = 0x92
- Data Byte 9 = 0x4A
- Data Byte 10 = 0xAB
- Data Byte 11 = 0xEE
- Data Byte 12 = 0x4E
- Data Byte 13 = 0xD5
- Data Byte 14 = 0x6C
- At this point, the first frame of data is clocked in. The next operation is to check the status.
- Checking hardware status.
- Framing status command. Command = 0x4. Note CS signal.
- Framing status command. Command = 0x4. Note CS signal.
- Data Byte 0 = 0x0
- Data Byte 1 = 0x0
- Data Byte 2 = 0x0
- Data Byte 3 = 0x0
- Data Byte 4 = 0x0
- Data Byte 5 = 0x0
- Data Byte 6 = 0x0
- Data Byte 7 = 0x0
- Data Byte 8 = 0x0
- Data Byte 9 = 0x0
- Data Byte 10 = 0x0
- Data Byte 11 = 0x0
- Data Byte 12 = 0x0
- Data Byte 13 = 0x0
- Data Byte 14 = 0x0
- Data Byte 15 = 0x0
- Instruction is loaded. Issue read instruction using 0x5 command.
- Checking hardware status.
- Reading command. Command = 0x5. Note CS signal.
- Reading Data Byte 0.
- Reading Data Byte 1.
- Reading Data Byte 2.
- Reading Data Byte 3.
- Reading Data Byte 4.
- Reading Data Byte 5.
- Reading Data Byte 6.
- Reading Data Byte 7.
- Reading Data Byte 8.
- Reading Data Byte 9.
- Reading Data Byte 10.
- Reading Data Byte 11 read
- Reading Data Byte 12.
- Reading Data Byte 13.
- Reading Data Byte 14.
- Reading Data Byte 15.