OpenCores
URL https://opencores.org/ocsvn/riscv_vhdl/riscv_vhdl/trunk

Subversion Repositories riscv_vhdl

[/] [riscv_vhdl/] [trunk/] [docs/] [doxygen/] [06g_spiflash.doxy] - Rev 5

Compare with Previous | Blame | View Log

/** @page spiflash_page SPI Controller

 @section spiflash_overview Overview

 This SPI controller is the specially developed module to support the
 following Flash memory ICs:
      \li Microchip 25AA1024 and 25LC1024.
      \li 1636PP52Y

 Read/write access to the controller's registers directly generate SPI
 signals sequence (nCS, SDO, SCK) to form read/write transaction request.
 AXI4 bus transaction is holded and CPU (or DMA) waits the response from the
 SPI interface all the time while SPI is active.
  
 The following generic parameters are used to configure the SPI controllers:

 | Name  | Default   | Description
 |:------|:---------:|:------------
 | xaddr | 0         | <b>Base address.</b> Bus address bits [31:12] allocated for the controller.
 | xmask | 16#fffff# | <b>Address mask.</b> Bus address mask bits used to specify allocated size (default 4 KB, minimum).

 @section spiflash_regs Mapped Registers

 SPI controller module acts like a slave AMBA AXI4 device that is directly mapped
 into physical memory. Default address location for this implementation 
 is defined as 0x00200000 with allocated memory size 256 KB.

 The lower 128 KB region is used for the direct access to the external Flash 
 memory via SPI interface. The control registers are mapped at offset 0x20000
 (upper 128 KB).

 @par Flash Region 128 KB (0x00000..0x20000).

 Read access to this region directly converted into SPI read request.
 4 and 8-bytes read requests is supported by this SPI controller.

 Write requests to this region doesn't generate any SPI activity. All write data
 is writing ONLY into the local Page Buffer (256 Bytes length). 4 or 8-bytes write
 access is supported. Address bits [31:8] are ignored and must be specified on
 write access into <b>Flash Page Write</b> register.

 @par Scaler register (0x20000).

 |Bits|Type| Reset |Field Name| Bits  | Description 
 |:--:|:--:|:-----:|:---------|:-----:|:------------------------------------------------------------|
 | 32 | RW | 0     | scaler   | 31:0  | <b>Clock Scaling Rate</b>. RW register is specifies the SPI frequency relative Bus Frequency. Fspi = Fbus / (2*scaler).

 @par Flash STATUS (0x20010).

 |Bits|Type| Field Name | Bits  | Description 
 |:--:|:--:|:-----------|:-----:|:------------------------------------------------------------|
 | 32 | RW |  STATUS    | 7:0   | <b>STATUS</b>. Flash STATUS register read via SPI. Read Command ID = 0x05; Write Command ID = 0x01.

 @par Flash ID (0x20018).

 |Bits|Type| Field Name| Bits  | Description 
 |:--:|:--:|:----------|:-----:|:------------------------------------------------------------|
 | 8  | RO |  ID       | 7:0   | <b>Manufacturer ID</b>. Read Only value read from Flash: 0x29 is the default value of Microchip. Command ID = 0xAB.

 @par Flash Write Enable (0x20020).

 |Bits|Type| Field Name| Bits  | Description 
 |:--:|:--:|:----------|:-----:|:------------------------------------------------------------|
 | 32 | WO |  WE       | 31:0  | <b>Flash Write Enable</b>. Writing to this register generates SPI transasction with command ID = 0x06. Write value is ignored.

 @par Flash Page Write (0x20028).

 |Bits|Type| Field Name| Bits  | Description 
 |:--:|:--:|:----------|:-----:|:------------------------------------------------------------|
 | 8  | WO | ignored   | 7:0   | Ignored.
 | 9  | WO | PAGE_ADDR | 16:8  | <b>Page address</b>. Page Address which is used to store current Page Buffer (256 Bytes) into external Flash. Command ID = 0x02.
 | 15 | WO | ignored   | 31:17 | Ignored.

 @par Flash Write Disable (0x20030).

 |Bits|Type| Field Name| Bits  | Description 
 |:--:|:--:|:----------|:-----:|:------------------------------------------------------------|
 | 32 | WO |  WD       | 31:0  | <b>Flash Write Disable</b>. Writing to this register generates SPI transasction with command ID = 0x04. Write value is ignored.

 @par Flash Page Erase (0x20038).

 |Bits|Type| Field Name| Bits  | Description 
 |:--:|:--:|:----------|:-----:|:------------------------------------------------------------|
 | 24 | WO | PAGE_ADDR | 23:0  | <b>Flash Page Erase</b>. Erase external Flash page with specified address. Command ID = 0x42.
 | 8  | WO | ignored   | 31:24 | Ignored.

 @par Flash Sectore Erase (0x20040).

 |Bits|Type| Field Name| Bits  | Description 
 |:--:|:--:|:----------|:-----:|:------------------------------------------------------------|
 | 24 | WO | SECTOR_ADDR | 23:0  | <b>Flash Sector Erase</b>. Erase external Flash sector with specified address. Command ID = 0xDB.
 | 8  | WO | ignored   | 31:24 | Ignored.

 @par Flash Chip Erase (0x20048).

 |Bits|Type| Field Name| Bits  | Description 
 |:--:|:--:|:----------|:-----:|:------------------------------------------------------------|
 | 32 | WO | ignored   | 31:0   | <b>Chip Erase</b>. Writing any value to this register generates SPI transasction with command ID = 0xC7. Write value is ignored.

 @par Deep Power-Down mode (0x20050).

 |Bits|Type| Field Name| Bits  | Description 
 |:--:|:--:|:----------|:-----:|:------------------------------------------------------------|
 | 32 | WO | ignored   | 31:0   | <b>Deep Power-Down mode</b>. Writing any value to this register generates SPI transasction with command ID = 0xB9 that sends ICs into Power-Down mode. Write value is ignored.

 
*/

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.