-
Notifications
You must be signed in to change notification settings - Fork 2k
/
Copy pathmtd_spi_nor_configs.c
61 lines (54 loc) · 1.6 KB
/
mtd_spi_nor_configs.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/*
* Copyright (C) 2016 Eistec AB
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*
*/
/**
* @ingroup drivers_mtd_spi_nor
* @{
*
* @file
* @brief Configurations for some known serial flash memory devices
*
* @author Joakim Nohlgård <[email protected]>
*/
#include <stdint.h>
#include "mtd_spi_nor.h"
/* Define opcode tables for SPI NOR flash memory devices here. */
/* Linker garbage collection (gcc -fdata-sections -Wl,--gc-sections) should ensure
* that only the tables that are actually used by the application will take up
* space in the .rodata section in program ROM. */
const mtd_spi_nor_opcode_t mtd_spi_nor_opcode_default = {
.rdid = 0x9f,
.wren = 0x06,
.rdsr = 0x05,
.wrsr = 0x01,
.read = 0x03,
.read_fast = 0x0b,
.page_program = 0x02,
.sector_erase = 0x20,
.block_erase_32k = 0x52,
.block_erase_64k = 0xd8,
.chip_erase = 0xc7,
.sleep = 0xb9,
.wake = 0xab,
};
const mtd_spi_nor_opcode_t mtd_spi_nor_opcode_default_4bytes = {
.rdid = 0x9f,
.wren = 0x06,
.rdsr = 0x05,
.wrsr = 0x01,
.read = 0x13,
.read_fast = 0x0c,
.page_program = 0x12,
.sector_erase = 0x21,
.block_erase_32k = 0x5c,
.block_erase_64k = 0xdc,
.chip_erase = 0xc7,
.sleep = 0xb9,
.wake = 0xab,
};
/** @} */