Skip to content

SPI RAM

Michael Ambrus edited this page Nov 28, 2017 · 1 revision

format: markdown categories: Workbenches toc: yes title: Workbench: 23LCV1024 - 1 Mbit SPI Serial SRAM with Battery Backup and SDI Interface ...

Introduction

This workbench shows how to use the API STM32F10x StdPeriph Lib with the SPI RAM 23LCV1024

Pinouts

pinout_sch spiram_tssop_pinout

Pinout of BusPirate socket / Pin-out of TSSOP.
Note that the BusPirate socket is mirrored on SparcFuns version (up to v3.6)

Connections

BPPin# BPName Dir CName 23LCV1024 Description
1 MISO SO Master In, Slave Out
2 CS /CS Chip Select (Active LOW)
3 MOSI SI Master Out, Slave In
4 CLK SCK Clock signal
5 AUX /HOLD Pauses SRAM, HIGH for normal operation (Active LOW)
9 3v3 P VCC Power
10 GND VSS Signal Ground

#Documents:

Note: FS links may be broken as they point to content into the workbench. This will happen if the workbench has some other content (which is normal).

Up to date

Other

This is the original chip (discontinued) which the BusPirate's demo is based upon.

  • Logically 23A256 differs from 23LCV1024 as follows:
    • Smaller size: 32KB instead of 128KB
    • Status register, bit #1 (HOLD). This bit doesn't exist on 23LCV1024
    • Consequently all commands involving an adress need 3 bytes, not 2. This is IMPORTANT
    • Default mode of operation is already Sequential Operation. No need to alter this register i.o.w. (but we'll do it anyways bust to make sure).

#BusPirate console This section is the 23K256_32K_serial_RAM example with the differences applied. Replies are stripped away for easy copy and paste. For full session see: BusPirate console Session example

##Setup Note:Blank lines are <Enter>

#
m
5
4



2

##Test

W
A
[1 0x40]
[5 r]
[0x02 0 0 0 5 6 7 8 9 10 11 12 13]
[0x03 0 0 0 r:9]

Build and run using ehwe

This is the real ehwe workbench makes use of the ehwe option cascading.

Configure runt-time defaults

Configure cmake with the following options:

 BUSPIRATE_ENABLE_SPI             ON
 BUSPIRATE_SPI_DFLT_AUX_ON        ON
 BUSPIRATE_SPI_DFLT_CLK_EDGE      EDGE_BACK
 BUSPIRATE_SPI_DFLT_CLK_IDLE_PO   POL_LOW
 BUSPIRATE_SPI_DFLT_CS_START_LE   ON
 BUSPIRATE_SPI_DFLT_ENABLE_PULL   OFF
 BUSPIRATE_SPI_DFLT_OUTPUT_TYPE   PUSH_PULL
 BUSPIRATE_SPI_DFLT_PON           ON
 BUSPIRATE_SPI_DFLT_SAMPLE        PULSE_MIDDLE
 BUSPIRATE_SPI_DFLT_SPEED         SPISPEED_1MHz

Run example

This example makes use of ehwe option cascading. To run it you may for example do:

./ehwe -d spi:1:bp:master:/dev/ttyUSB0 -v warning  -- \
	-x1 "Hohoho, santa is comming"

###Options and arguments

  • Option -x N: Where N is the number of times pattern is consecutively repeated writing.
  • Arg #1: Pattern (string). The pattern to write in SPI-RAM

This is a sidebar...

Clone this wiki locally