Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
learn:courses:unit-4-lab4c:start [2017/03/22 17:58] – Marthalearn:courses:unit-4-lab4c:start [2022/10/04 11:38] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ====== Lab 4c: Communications - SPI Serial Protocols ====== ====== Lab 4c: Communications - SPI Serial Protocols ======
 +[[{}/learn/courses/unit-4-1/start|Back to Unit 4 Part 1]]
 +[[{}/learn/courses/unit-4-2/start|Back to Unit 4 Part 2]]
 +[[{}/learn/courses/unit-4-lab4b/start|Back to Lab 4b]]
  
 === Download This Document === === Download This Document ===
-  * {{ :learn:courses:unit-4-lab4c:lab_4c.pdf |Lab 4c PDF}}+{{ :learn:courses:unit-4-lab4c:lab_4c.pdf |Lab 4c PDF}}
  
  
 ===== 1. Objectives ===== ===== 1. Objectives =====
-  * Learn how to configure an SPI channel on the PIC32MX370 processor. +  - Learn how to configure an SPI channel on the PIC32MX370 processor. 
-  * Learn the difference between software and hardware handshaking. +  - Learn the difference between software and hardware handshaking. 
-  * Learn how to communicate with an SPI FLASH memory device.+  - Learn how to communicate with an SPI FLASH memory device.
  
  
Line 14: Line 17:
  
 ===== 2. Basic Knowledge ===== ===== 2. Basic Knowledge =====
-  * How to configure I/O pins on a Microchip PIC32 PPS microprocessor. +  - How to configure I/O pins on a Microchip PIC32 PPS microprocessor. 
-  * How to configure the Analog Discovery 2 to display logic traces. +  - How to configure the Analog Discovery 2 to display logic traces. 
-  * How to implement code reuse that integrates previously developed processor code into new application projects.+  - How to implement code reuse that integrates previously developed processor code into new application projects.
  
  
Line 23: Line 26:
 ===== 3. Equipment List ===== ===== 3. Equipment List =====
 ==== 3.1. Hardware ==== ==== 3.1. Hardware ====
-  * [[http://store.digilentinc.com/basys-mx3-pic32mx-trainer-board-recommended-for-embedded-systems-courses/|Basys MX3 trainer board]] +  - [[https://digilent.com/shop/basys-mx3-pic32mx-trainer-board-for-embedded-systems-courses/|Basys MX3 trainer board]] 
-  * Workstation computer running Windows 10 or higher, MAC OS, or Linux +  - Workstation computer running Windows 10 or higher, MAC OS, or Linux 
-  * 2 [[http://store.digilentinc.com/usb-a-to-micro-b-cable/|Standard USB A to micro-B cables]]+  - 2 [[https://digilent.com/shop/usb-a-to-micro-b-cable/|Standard USB A to micro-B cables]]
  
 In addition, we suggest the following instruments: In addition, we suggest the following instruments:
-  * [[http://store.digilentinc.com/analog-discovery-2-100msps-usb-oscilloscope-logic-analyzer-and-variable-power-supply/|Analog Discovery 2]]+  - [[https://digilent.com/shop/analog-discovery-2-100ms-s-usb-oscilloscope-logic-analyzer-and-variable-power-supply/|Analog Discovery 2]]
  
 ==== 3.2. Software ==== ==== 3.2. Software ====
 The following programs must be installed on your development work station: The following programs must be installed on your development work station:
  
-  * [[http://www.microchip.com/mplab/mplab-x-ide|Microchip MPLAB X® v3.35 or higher]] +  - [[http://www.microchip.com/mplab/mplab-x-ide|Microchip MPLAB X® v3.35 or higher]] 
-  * [[http://www.microchip.com/SWLibraryWeb/product.aspx?product=PIC32%20Peripheral%20Library|PLIB Peripheral Library]] +  - [[http://www.microchip.com/SWLibraryWeb/product.aspx?product=PIC32%20Peripheral%20Library|PLIB Peripheral Library]] 
-  * [[http://www.microchip.com/xcdemo/xcpluspromo.aspx|XC32 Cross Compiler]] +  - [[http://www.microchip.com/xcdemo/xcpluspromo.aspx|XC32 Cross Compiler]] 
-  * [[http://store.digilentinc.com/waveforms-2015-download-only/|WaveForms 2015]]  +  - [[https://digilent.com/shop/software/digilent-waveforms/|WaveForms]]  
-  * [[http://www.putty.org/|PuTTY Terminal Emulation]]+  - [[http://www.putty.org/|PuTTY Terminal Emulation]]
  
 ---- ----
  
 ===== 4. Project Takeaways ===== ===== 4. Project Takeaways =====
-  * Understanding of requirements and implementations of synchronous communications. +  - Understanding of requirements and implementations of synchronous communications. 
-  * Understanding of the SPI protocol. +  - Understanding of the SPI protocol. 
-  * How to generate instruction sets for controlling SPI devices.+  - How to generate instruction sets for controlling SPI devices.
  
 ---- ----
Line 69: Line 72:
  
  
-{{ :learn:courses:unit-4-lab4c:lab4c-fig-5-1.png?nolink&700 |Figure 5.1. Parallel multiple slave SPI bus configuration with individual device select signals.}}+{{ :learn:courses:unit-4-lab4c:lab4c-fig-5-1.png?nolink&500 |Figure 5.1. Parallel multiple slave SPI bus configuration with individual device select signals.}}
 //Figure 5.1. Parallel multiple slave SPI bus configuration with individual device select signals.// //Figure 5.1. Parallel multiple slave SPI bus configuration with individual device select signals.//
  
-{{ :learn:courses:unit-4-lab4c:lab4c-fig-5-2.png?nolink&700 |Figure 5.2. Daisy chain multiple slave SPI bus configuration with a common device select signal.}}+{{ :learn:courses:unit-4-lab4c:lab4c-fig-5-2.png?nolink&500 |Figure 5.2. Daisy chain multiple slave SPI bus configuration with a common device select signal.}}
 //Figure 5.2. Daisy chain multiple slave SPI bus configuration with a common device select signal.// //Figure 5.2. Daisy chain multiple slave SPI bus configuration with a common device select signal.//
  
 When the microprocessor is connected to a slave device that has both input and output capability using SPI, as data is clocked out of the master, data is also clocked in from the slave device. This results in efficient data transfers for some slave devices. The loosely defined SPI interface requires careful consideration of the slave clock-data timing, as well as using a microprocessor that can be configured to support various timing requirements. Figure 5.3 shows the clock-data timing for the four SPI operating modes. The clock polarity (CPOL) controls the idle level of the SCK output from the master. If CPOL is high, then the idle level of SCK is high. The clock phase (CPHA) specifies when the data is to be changed or written to MOSI by the master and to MISO by the slave device. For example, when CPHA is low, the data signal (MISO for master and MOSI for the slave) is sampled by the receiving device when SCK makes a transition from the idle level to the active level.  When the microprocessor is connected to a slave device that has both input and output capability using SPI, as data is clocked out of the master, data is also clocked in from the slave device. This results in efficient data transfers for some slave devices. The loosely defined SPI interface requires careful consideration of the slave clock-data timing, as well as using a microprocessor that can be configured to support various timing requirements. Figure 5.3 shows the clock-data timing for the four SPI operating modes. The clock polarity (CPOL) controls the idle level of the SCK output from the master. If CPOL is high, then the idle level of SCK is high. The clock phase (CPHA) specifies when the data is to be changed or written to MOSI by the master and to MISO by the slave device. For example, when CPHA is low, the data signal (MISO for master and MOSI for the slave) is sampled by the receiving device when SCK makes a transition from the idle level to the active level. 
  
-{{ :learn:courses:unit-4-lab4c:lab4c-fig-5-3.png?nolink&700 |Figure 5.3. SPI timing modes.}}+{{ :learn:courses:unit-4-lab4c:lab_4c_fig_5_3.jpg?nolink |Figure 5.3. SPI timing modes.}}
 //Figure 5.3. SPI timing modes.// //Figure 5.3. SPI timing modes.//
 +
  
 Figure 5.4 shows the PIC32 settings for clock edge (CKE) and clock polarity (CKP). Table 5.1 provides the correlation between the conventional definitions of SPI mode CPHA and CPOL to those CKE and CKP settings. (Note: There is an apparent error in the Microchip table shown in Fig. 5.4. Both CKE and CKP should be equal to 1 for the fourth case of the SCK timing diagrams.) It is important to match the master processor operation to what the slave device is expecting. For some designs, it is possible for different slave devices to expect the master to operate in modes that are not the same. The PIC32 operating modes can be changed during program execution, but the modes should not be changed when the processor is actively clocking data on the SPI bus. Figure 5.4 shows the PIC32 settings for clock edge (CKE) and clock polarity (CKP). Table 5.1 provides the correlation between the conventional definitions of SPI mode CPHA and CPOL to those CKE and CKP settings. (Note: There is an apparent error in the Microchip table shown in Fig. 5.4. Both CKE and CKP should be equal to 1 for the fourth case of the SCK timing diagrams.) It is important to match the master processor operation to what the slave device is expecting. For some designs, it is possible for different slave devices to expect the master to operate in modes that are not the same. The PIC32 operating modes can be changed during program execution, but the modes should not be changed when the processor is actively clocking data on the SPI bus.
  
-**Table 5.1. SPI SCK operational modes.+**Table 5.1. SPI SCK operational modes.**
  
 ^ SPI Mode    ^ Active Level  ^ Sample Transition  ^ CPOL  ^ CPHA  ^ PIC32 CKP  ^ PIC32 CKE  ^ ^ SPI Mode    ^ Active Level  ^ Sample Transition  ^ CPOL  ^ CPHA  ^ PIC32 CKP  ^ PIC32 CKE  ^
Line 90: Line 94:
 | 3 (or 1,1)  | Low           | Active to Idle     | 1     | 1     | 1          | 0          | | 3 (or 1,1)  | Low           | Active to Idle     | 1     | 1     | 1          | 0          |
  
-{{ :learn:courses:unit-4-lab4c:lab4c-fig-5-4.png?nolink&600 |Figure 5.4. PIC32 SPI control setting to specify the sample timing (Reproduced from Microchip PIC32 Family Reference Guide Section 23, Fig. 23-7).}}+{{ :learn:courses:unit-4-lab4c:lab4c-fig-5-4.png?nolink&500 |Figure 5.4. PIC32 SPI control setting to specify the sample timing (Reproduced from Microchip PIC32 Family Reference Guide Section 23, Fig. 23-7).}}
 //Figure 5.4. PIC32 SPI control setting to specify the sample timing (Reproduced from Microchip PIC32 Family Reference Guide Section 23, Fig. 23-7).// //Figure 5.4. PIC32 SPI control setting to specify the sample timing (Reproduced from Microchip PIC32 Family Reference Guide Section 23, Fig. 23-7).//
  
Line 109: Line 113:
 ===== 7. Background Information ===== ===== 7. Background Information =====
 ==== 7.1. PIC32MX370 SPI I/O ==== ==== 7.1. PIC32MX370 SPI I/O ====
-Figure 7.1 shows the signal connections to the S25FL132K flash memory IC. Table 7.1 lists the PIC32MX370 processor pins that these signals are connected to. The PIC32 processor pin for the SPI_CE signal is configured as a digital output pin. To implement the wiring configuration shown in Fig. 7.1, processor I/O pins PORT F:2 and PORTF:7 are mapped to SPI1T and SPI1R respectively using the first two statements in Listing B.1 in Appendix B. The PIC32MX370 PORTF:6 has a fixed assignment to SCK1.+Figure 7.1 shows the signal connections to the S25FL132K flash memory IC. Table 7.1 lists the PIC32MX370 processor pins that these signals are connected to. The PIC32 processor pin for the SPI_CE signal is configured as a digital output pin, as shown in Listing B.1. To implement the wiring configuration shown in Fig. 7.1, processor I/O pins PORT F:2 and PORTF:7 are mapped to SPI1T and SPI1R respectively using the first two statements in Listing B.2 in Appendix B. The PIC32MX370 PORTF:6 has a fixed assignment to SCK1.
  
-{{ :learn:courses:unit-4-lab4c:lab4c-fig-7-1.png?nolink&600 |Figure 7.1. SPI flash memory IC schematic diagram.}}+{{ :learn:courses:unit-4-lab4c:lab_4c_fig_7_1.jpg?nolink&400 |Figure 7.1. SPI flash memory IC schematic diagram.}}
 //Figure 7.1. SPI flash memory IC schematic diagram.// //Figure 7.1. SPI flash memory IC schematic diagram.//
  
Line 119: Line 123:
 | Chip Enable          | SPI_CE – 1        | PORT F Pin 8                 | | Chip Enable          | SPI_CE – 1        | PORT F Pin 8                 |
 | Serial Clock         | SPI_SCK – 6       | PORT F Pin 6 – SCK1          | | Serial Clock         | SPI_SCK – 6       | PORT F Pin 6 – SCK1          |
-| Flash Serial Input   | SPI_SI – 5        | PORT F Pin 2 – SPI1R (MISO)  | +| Flash Serial Input   | SPI_SI – 5        | PORT F Pin 2 – SPI1R (MOSI)  | 
-| Flash Serial Output  | SPI_SO – 2        | PORT F Pin 7 – SPI1T (MOSI)  |+| Flash Serial Output  | SPI_SO – 2        | PORT F Pin 7 – SPI1T (MISO)  |
  
  
 ==== 7.2. Interface with SPI Flash Memory ==== ==== 7.2. Interface with SPI Flash Memory ====
-Using the SPI initialization shown in Listing A.1, the PIC32 processor is configured for SPI Mode 0 operation. Figure 7.2 shows that the bit output is held constant when the clock pulse makes a positive transition. Figure 7.2 also shows that the bit rate is 1 MHz.+Using the SPI initialization shown in Listing B.2, the PIC32 processor is configured for SPI Mode 0 operation. Figure 7.2 shows that the bit output is held constant when the clock pulse makes a positive transition. Figure 7.2 also shows that the bit rate is 1 MHz.
  
-{{ :learn:courses:unit-4-lab4c:lab4c-fig-7-2.png?nolink&600 |Figure 7.2. SPI Bit timing for Mode 0 configuration.}}+{{ :learn:courses:unit-4-lab4c:lab_4c_fig_7_2.png?nolink |Figure 7.2. SPI Bit timing for Mode 0 configuration.}}
 //Figure 7.2. SPI Bit timing for Mode 0 configuration.// //Figure 7.2. SPI Bit timing for Mode 0 configuration.//
 +
  
 As Fig. A.2 shows, the same SPIxSR serial shift buffer is used for input and output, thus requiring the common SCKx clock signal. Hence, when a byte of data is shifted out of the SDOx pin, data is also being shifted into the SPIxSR from the SDIx pin. In other words, to receive SPI serial data, you must send SPI serial data.  As Fig. A.2 shows, the same SPIxSR serial shift buffer is used for input and output, thus requiring the common SCKx clock signal. Hence, when a byte of data is shifted out of the SDOx pin, data is also being shifted into the SPIxSR from the SDIx pin. In other words, to receive SPI serial data, you must send SPI serial data. 
  
-Listing B.2 shows the function that can be used to send, receive, or exchange a byte of data using SPI communications. In most cases, when the SPI master is sending header data to the slave, the master SPI ignores the data received on the SDIx pin. Similarly, as the master continues to send non-consequential data during a SPI slave read operation, the slave SPI discards the data sent to it. The SPI master clock must be generated for both sending and receiving.+Listing B.3 shows the function that can be used to send, receive, or exchange a byte of data using SPI communications. In most cases, when the SPI master is sending header data to the slave, the master SPI ignores the data received on the SDIx pin. Similarly, as the master continues to send non-consequential data during a SPI slave read operation, the slave SPI discards the data sent to it. The SPI master clock must be generated for both sending and receiving.
  
 === 7.2.1. SPI Flash Memory Software === === 7.2.1. SPI Flash Memory Software ===
Line 156: Line 161:
 | Program Security Registers<sup>(3)</sup>              | 42h                   | A23-A16       | A15-A8       | A7-A0     | D7-D0, …       |             | | Program Security Registers<sup>(3)</sup>              | 42h                   | A23-A16       | A15-A8       | A7-A0     | D7-D0, …       |             |
  
-{{ :learn:courses:unit-4-lab4c:lab4c-fig-7-3.png?nolink&600 |Figure 7.3. Release Power Down/Read Device ID SPI transaction.}}+{{ :learn:courses:unit-4-lab4c:lab_4c_fig_7_3.png?nolink |Figure 7.3. Release Power Down/Read Device ID SPI transaction.}}
 //Figure 7.3. Release Power Down/Read Device ID SPI transaction.// //Figure 7.3. Release Power Down/Read Device ID SPI transaction.//
  
Line 203: Line 208:
 | Continuous Read Mode Reset<sup>(6)</sup>  | FFh                   | FFh                |                             |                 |             |                 | | Continuous Read Mode Reset<sup>(6)</sup>  | FFh                   | FFh                |                             |                 |             |                 |
  
- +{{ :learn:courses:unit-4-lab4c:lab_4c_fig_7_4.png?nolink |Figure 7.4. SPI Flash Read Byte command and three-byte address followed by reading data 'A', 'B', 'C', etc.}}
-{{ :learn:courses:unit-4-lab4c:lab4c-fig-7-4.png?nolink&600 |Figure 7.4. SPI Flash Read Byte command and three-byte address followed by reading data 'A', 'B', 'C', etc.}} +
 //Figure 7.4. SPI Flash Read Byte command and three-byte address followed by reading data 'A', 'B', 'C', etc.// //Figure 7.4. SPI Flash Read Byte command and three-byte address followed by reading data 'A', 'B', 'C', etc.//
  
Line 248: Line 252:
   - Download the completed functional project to the PIC32MX370 processor and test by running the project.   - Download the completed functional project to the PIC32MX370 processor and test by running the project.
  
-{{ :learn:courses:unit-4-lab4c:lab4c-fig-8-1.png?nolink&600 |Figure 8.1. Call map for SPI FLash Write Page.}}+{{ :learn:courses:unit-4-lab4c:lab4c-fig-8-1.png?nolink&400 |Figure 8.1. Call map for SPI FLash Write Page.}}
 //Figure 8.1. Call map for SPI FLash Write Page.// //Figure 8.1. Call map for SPI FLash Write Page.//
  
-{{ :learn:courses:unit-4-lab4c:lab4c-fig-8-2.png?nolink&400 |Figure 8.2. Call map for SPI Flash Erase.}}+{{ :learn:courses:unit-4-lab4c:lab4c-fig-8-2.png?nolink&600 |Figure 8.2. Call map for SPI Flash Erase.}}
 //Figure 8.2. Call map for SPI Flash Erase.// //Figure 8.2. Call map for SPI Flash Erase.//
  
Line 260: Line 264:
  
 ==== 8.5. SPI Design Challenge ==== ==== 8.5. SPI Design Challenge ====
-Replace the code in Listing B.6 for the function “SPIFLASH_WritePage” that uses software-intensive “for” loops with one that uses DMA.+Replace the code in Listing B.7 for the function “SPIFLASH_WritePage” that uses software-intensive “for” loops with one that uses DMA.
    
 +
 ---- ----
  
 ===== 9. Questions ===== ===== 9. Questions =====
-1. Whyy does SPI normally have higher data transfer rates?\\ +1. Why does SPI normally have higher data transfer rates?\\
- +
-<color #ed1c24>ANSWER:\\ +
-  - No overhead to select the slave device.\\ +
-  - Full-duplex operation\\ +
-  - Higher maximum SCK speeds\\ +
-  - No ACK bit for each 8 data bits\\ +
-</color>\\+
  
 2. Is it necessary for the SPI SCK signal to have a 50% duty cycle?\\ 2. Is it necessary for the SPI SCK signal to have a 50% duty cycle?\\
- 
-<color #ed1c24>ANSWER:\\  
-No. However, the minimum duty cycle is constrained to be greater than the period of 2 times the maximum SPI clock rate.\\ 
-</color>\\ 
  
 3. Can text data be sent using SPI communications?\\ 3. Can text data be sent using SPI communications?\\
- 
-<color #ed1c24>Yes, but since the data can be configured for 8, 16, or 32 bits it is up to application that uses the data to package it appropriately for ASCII encoding.</color>\\ 
  
 4. Can SPI master be configured for only receiving data without transmitting data?\\ 4. Can SPI master be configured for only receiving data without transmitting data?\\
- 
-<color #ed1c24>ANSWER:\\ 
-No. The only way to generate a clock is by sending data. The MOSI pin will send useless data that will be ignored by devices on the SPI MOSI bus that are not selected by a chip enable. 
-</color>\\ 
  
 5. How many slave devices can be connected to the SPI bus?\\ 5. How many slave devices can be connected to the SPI bus?\\
-<color #ed1c24>ANSWER:\\ 
-This question does not have a simple answer. It depends on the pin capacitance and input current leakage of the slave devices, the clock speed, and the physical length of the bus wires. The bigger issue is probably the number of processor pins that are available for the device select.</color>\\ 
  
 6. What will happen to the SPI communications is an interrupt occurs in the middle of a transmission?\\ 6. What will happen to the SPI communications is an interrupt occurs in the middle of a transmission?\\
-<color #ed1c24>ANSWER:\\  
-Nothing. It is the clock edges that causes the data on the MISO and MOSI bus to be sensed. The clock pulses can be stretched without consequences. See question 2. 
-</color>\\ 
  
 ---- ----
Line 317: Line 300:
 //Figure A.1. Unit 4 hardware and instrumentation configuration.// //Figure A.1. Unit 4 hardware and instrumentation configuration.//
  
-{{ :learn:courses:unit-4-lab4c:part2-fig-a-1.png?nolink&600 |Figure A.2. SPI block diagram from the Microchip PIC32MX370 data sheet.}} 
-//Figure A.2. SPI block diagram from the Microchip PIC32MX370 data sheet.// 
  
 ---- ----
  
 ===== Appendix B: Allocating a Heap in MPLAB X ===== ===== Appendix B: Allocating a Heap in MPLAB X =====
-==== Listing B.1. SPI Channel 1 Initialization for Master Mode ====+==== Listing B.1. Flash Memory SPI Initialization ==== 
 +<code> 
 +#define SPIFLASH_SEL              LATFbits.LATF8       
 +#define SPIFLASH_CS_TRIS          TRISFbits.TRISF8     
 +unsigned int flash_mem_init(void)  
 +{ 
 +unsigned int bitrate; 
 + 
 +    bitrate = init_SPI1(); 
 +    SPIFLASH_CS_TRIS = 0;       // Set FLASH select as output 
 +    SPIFLASH_SEL = 1;           // Reset FLASH chip select  
 +    return bitrate;             // Has no meaning at this time 
 +} 
 +</code> 
 + 
 +==== Listing B.2. SPI Channel 1 Initialization for Master Mode ====
 <code> <code>
 #define MAX_SPI_CLK_FREQ          1000000 #define MAX_SPI_CLK_FREQ          1000000
Line 366: Line 362:
 </code> </code>
  
-==== Listing B.2. SPI Channel 1 Byte Transaction ====+==== Listing B.3. SPI Channel 1 Byte Transaction ====
 <code> <code>
 BYTE spiXfer(BYTE data_out) BYTE spiXfer(BYTE data_out)
Line 376: Line 372:
 </code> </code>
  
-==== Listing B.3. FLASH Transfer Bytes ====+==== Listing B.4. FLASH Transfer Bytes ==== 
 +<code>
 void SPIFLASH_TrasferBytes(int nBytes, unsigned char *pbRdData,  void SPIFLASH_TrasferBytes(int nBytes, unsigned char *pbRdData, 
                           unsigned char *pbWrData)                           unsigned char *pbWrData)
Line 391: Line 388:
 </code> </code>
  
-==== Listing B.4. FLASH Release Power Down and Read Device ID ===+==== Listing B.5. FLASH Release Power Down and Read Device ID ===
 <code> <code>
 void SPIFLASH_ReleasePowerDownGetDeviceID(BYTE *rd) void SPIFLASH_ReleasePowerDownGetDeviceID(BYTE *rd)
Line 406: Line 403:
 </code> </code>
  
-==== Listing B.5. SPI Write Data to Flash ====+==== Listing B.6. SPI Write Data to Flash ====
 <code> <code>
 int SPIFLASH_WriteData(int nBytes, BYTE *pbWrData, unsigned int flashAddr) int SPIFLASH_WriteData(int nBytes, BYTE *pbWrData, unsigned int flashAddr)
Line 441: Line 438:
 </code> </code>
  
-==== Listing B.6. SPI Write Page Data to Flash ====+==== Listing B.7. SPI Write Page Data to Flash ====
 <code> <code>
 static int SPIFLASH_WritePage(int nBytes, unsigned char *pbWrData,  static int SPIFLASH_WritePage(int nBytes, unsigned char *pbWrData, 
Line 518: Line 515:
 </code> </code>
  
 +----
 +
 +[[{}/learn/courses/unit-4-1/start|Back to Unit 4 Part 1]]
 +[[{}/learn/courses/unit-4-2/start|Back to Unit 4 Part 2]]
 +[[{}/learn/courses/unit-4-lab4b/start|Back to Lab 4b]]
 +[[{}/learn/courses/unit-4-lab4d/start|Go to Lab 4d]]
 +[[{}/learn/courses/unit-5/start|Go to Unit 5]]