initial working (stm32f4-discovery)
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
---
|
||||
name: 'Bug report'
|
||||
about: 'Create a report to help us improve the quality of our software'
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
---
|
||||
|
||||
**Caution**
|
||||
|
||||
The Issues are strictly limited for the reporting of problem encountered with the software provided in this project.
|
||||
For any other problem related to the STM32 product, the performance, the hardware characteristics and boards, the tools the environment in general, please post your report to the **ST Community** in the STM32 MCUs dedicated [page](https://community.st.com/s/group/0F90X000000AXsASAW/stm32-mcus).
|
||||
|
||||
**Describe the set-up**
|
||||
|
||||
* The board (either ST RPN reference or your custom board)
|
||||
* IDE or at least the compiler and its version
|
||||
|
||||
**Describe the bug (skip if none)**
|
||||
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**How to reproduce the bug (skip if none)**
|
||||
|
||||
1. Indicate the global behavior of your application project
|
||||
2. List the modules that you suspect to be the cause of the problem (Drivers, BSP, MW...)
|
||||
3. Describe the use case that generates the problem
|
||||
4. How we can reproduce the problem
|
||||
|
||||
|
||||
**Additional context**
|
||||
|
||||
If you have a first analysis, an enhancement, a fix or a patch, thank you to share your proposal.
|
||||
|
||||
**Screenshots**
|
||||
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
@@ -0,0 +1,3 @@
|
||||
## IMPORTANT INFORMATION
|
||||
|
||||
Pull-requests are **not** accepted on this repository. Please use issues to report any bug or request.
|
||||
@@ -0,0 +1,73 @@
|
||||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
In the interest of fostering an open and welcoming environment, we as
|
||||
contributors and maintainers pledge to making participation in our project and
|
||||
our community a harassment-free experience for everyone, regardless of age, body
|
||||
size, disability, ethnicity, sex characteristics, gender identity and expression,
|
||||
level of experience, education, socio-economic status, nationality, personal
|
||||
appearance, race, religion, or sexual identity and orientation.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to creating a positive environment
|
||||
include:
|
||||
|
||||
* Using welcoming and inclusive language
|
||||
* Being respectful of differing viewpoints and experiences
|
||||
* Gracefully accepting constructive criticism
|
||||
* Focusing on what is best for the community
|
||||
* Showing empathy towards other community members
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
* The use of sexualized language or imagery and unwelcome sexual attention or
|
||||
advances
|
||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or electronic
|
||||
address, without explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
## Our Responsibilities
|
||||
|
||||
Project maintainers are responsible for clarifying the standards of acceptable
|
||||
behavior and are expected to take appropriate and fair corrective action in
|
||||
response to any instances of unacceptable behavior.
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or
|
||||
reject comments, commits, code, wiki edits, issues, and other contributions
|
||||
that are not aligned to this Code of Conduct, or to ban temporarily or
|
||||
permanently any contributor for other behaviors that they deem inappropriate,
|
||||
threatening, offensive, or harmful.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies both within project spaces and in public spaces
|
||||
when an individual is representing the project or its community. Examples of
|
||||
representing a project or community include using an official project e-mail
|
||||
address, posting via an official social media account, or acting as an appointed
|
||||
representative at an online or offline event. Representation of a project may be
|
||||
further defined and clarified by project maintainers.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported by contacting the project team via this [link](https://www.st.com/content/st_com/en/contact-us.html).
|
||||
All complaints will be reviewed and investigated and will result in a response that
|
||||
is deemed necessary and appropriate to the circumstances. The project team is
|
||||
obligated to maintain confidentiality with regard to the reporter of an incident.
|
||||
Further details of specific enforcement policies may be posted separately.
|
||||
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good
|
||||
faith may face temporary or permanent repercussions as determined by other
|
||||
members of the project's leadership.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 1.4,
|
||||
available [here](https://www.contributor-covenant.org/version/1/4/code-of-conduct.html).
|
||||
|
||||
For answers to common questions about this code of conduct, see the [FAQ section](https://www.contributor-covenant.org/faq).
|
||||
@@ -0,0 +1,28 @@
|
||||
## Contributing guide
|
||||
|
||||
This document serves as a checklist before contributing to this repository.
|
||||
It includes links to read up on if topics are unclear to you.
|
||||
|
||||
This guide mainly focuses on steps to be followed to submit an issue or a pull-request.
|
||||
|
||||
### 1. Before opening an issue
|
||||
|
||||
To report a bug or a request please file an issue in the right repository
|
||||
(example for [s25fl512s](https://github.com/STMicroelectronics/s25fl512s/issues/new/choose)).
|
||||
|
||||
Please check the following boxes before posting an issue:
|
||||
- [ ] `Make sure you are using the latest commit (major releases are tagged, but corrections are available as new commits).`
|
||||
- [ ] `Make sure your issue is a question/feedback/suggestions RELATED TO the software provided in this repository.` Otherwise, it should be submitted to the ST Community under the MCU topic [page](https://community.st.com/s/group/0F90X000000AXsASAW/stm32-mcus).
|
||||
- [ ] `Make sure your issue is not already reported/fixed on GitHub or discussed on a previous issue.` Please refer to this [dashboard](https://github.com/orgs/STMicroelectronics/projects/2) for the list of issues and pull-requests. Do not forget to browse into the **closed** issues.
|
||||
|
||||
### 2. Posting the issue
|
||||
When you have checked the previous boxes. You will find two templates (Bug Report or Other Issue) available in the **Issues** tab of the repository.
|
||||
|
||||
### 3. Pull Requests
|
||||
Pull-requests are **not** accepted on this repository. Please use **issues** to report any bug or request.
|
||||
|
||||
### 4. How to proceed
|
||||
|
||||
* We recommend to engage first a communication thru an issue, in order to present your proposal. Just to confirm that it corresponds to STMicroelectronics domain or scope.
|
||||
* Then fork the project to your GitHub account to further develop your contribution. Please use the latest commit version.
|
||||
* Please, submit one Pull Request for one new feature or proposal. This will ease the analysis and the final merge if accepted.
|
||||
@@ -0,0 +1,27 @@
|
||||
Copyright 2017 STMicroelectronics.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation and/or
|
||||
other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software without
|
||||
specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@@ -0,0 +1,40 @@
|
||||
# BSP S25FL512S Component
|
||||
|
||||
## Overview
|
||||
|
||||
**STM32Cube** is an STMicroelectronics original initiative to ease the developers life by reducing efforts, time and cost.
|
||||
|
||||
**STM32Cube** covers the overall STM32 products portfolio. It includes a comprehensive embedded software platform delivered for each STM32 series.
|
||||
* The CMSIS modules (core and device) corresponding to the ARM(tm) core implemented in this STM32 product.
|
||||
* The STM32 HAL-LL drivers, an abstraction layer offering a set of APIs ensuring maximized portability across the STM32 portfolio.
|
||||
* The BSP drivers of each evaluation, demonstration or nucleo board provided for this STM32 series.
|
||||
* A consistent set of middleware components such as RTOS, USB, FatFS, graphics, touch sensing library...
|
||||
* A full set of software projects (basic examples, applications, and demonstrations) for each board provided for this STM32 series.
|
||||
|
||||
Two models of publication are proposed for the STM32Cube embedded software:
|
||||
* The monolithic **MCU Package**: all STM32Cube software modules of one STM32 series are present (Drivers, Middleware, Projects, Utilities) in the repository (usual name **STM32Cubexx**, xx corresponding to the STM32 series).
|
||||
* The **MCU component**: each STM32Cube software module being part of the STM32Cube MCU Package, is delivered as an individual repository, allowing the user to select and get only the required software functions.
|
||||
|
||||
## Description
|
||||
|
||||
This **s25fl512s** MCU component repository is one element **common to all** STM32Cube MCU embedded software packages, providing the **S25FL512S** BSP QSPI component part.
|
||||
|
||||
## License
|
||||
|
||||
Copyright (c) 2015 STMicroelectronics
|
||||
|
||||
This software component is licensed by STMicroelectronics under the **BSD-3-Clause** license. You may not use this software except in compliance with this license. You may obtain a copy of the license [here](https://opensource.org/licenses/BSD-3-Clause).
|
||||
|
||||
## Release note
|
||||
|
||||
Details about the content of this release are available in the release note [here](https://htmlpreview.github.io/?https://github.com/STMicroelectronics/s25fl512s/blob/main/Release_Notes.html).
|
||||
|
||||
## Compatibility information
|
||||
|
||||
Please refer to the repository of the BSP **board** driver you are using to know which version of this BSP component driver to use. It is **crucial** that you use a consistent set of versions.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
If you have any issue with the **software content** of this repository, you can file an issue [here](https://github.com/STMicroelectronics/s25fl512s/issues/new/choose).
|
||||
|
||||
For any other question related to the product, the tools, the environment, you can submit a topic to the [ST Community](https://community.st.com/s/).
|
||||
@@ -0,0 +1,31 @@
|
||||
# Report potential product security vulnerabilities
|
||||
|
||||
ST places a high priority on security, and our Product Security Incident
|
||||
Response Team (PSIRT) is committed to rapidly addressing potential security
|
||||
vulnerabilities affecting our products. PSIRT's long history and vast experience
|
||||
in security allows ST to perform clear analyses and provide appropriate guidance
|
||||
on mitigations and solutions when applicable.
|
||||
|
||||
If you wish to report potential security vulnerabilities regarding our products,
|
||||
**please do not report them through public GitHub issues.** Instead, we
|
||||
encourage you to report them to our ST PSIRT following the process described at:
|
||||
**https://www.st.com/content/st_com/en/security/report-vulnerabilities.html**
|
||||
|
||||
### IMPORTANT - READ CAREFULLY:
|
||||
|
||||
STMicroelectronics International N.V., on behalf of itself, its affiliates and
|
||||
subsidiaries, (collectively “ST”) takes all potential security vulnerability
|
||||
reports or other related communications (“Report(s)”) seriously. In order to
|
||||
review Your Report (the terms “You” and “Yours” include your employer, and all
|
||||
affiliates, subsidiaries and related persons or entities) and take actions as
|
||||
deemed appropriate, ST requires that we have the rights and Your permission to
|
||||
do so.
|
||||
|
||||
As such, by submitting Your Report to ST, You agree that You have the right to
|
||||
do so, and You grant to ST the rights to use the Report for purposes related to
|
||||
security vulnerability analysis, testing, correction, patching, reporting and
|
||||
any other related purpose or function.
|
||||
|
||||
By submitting Your Report, You agree that ST’s
|
||||
[Privacy Policy](https://www.st.com/content/st_com/en/common/privacy-portal.html)
|
||||
applies to all related communications.
|
||||
@@ -0,0 +1,242 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* @file s25fl512s.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.0.0
|
||||
* @date 03-August-2015
|
||||
* @brief This file contains all the description of the S25FL512S QSPI memory.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* Copyright (c) 2015 STMicroelectronics.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This software is licensed under terms that can be found in the LICENSE file
|
||||
* in the root directory of this software component.
|
||||
* If no LICENSE file comes with this software, it is provided AS-IS.
|
||||
*
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||
#ifndef __S25FL512S_H
|
||||
#define __S25FL512S_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
|
||||
/** @addtogroup BSP
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup Components
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup s25fl512s
|
||||
* @brief This file provides a set of definitions for the Spansion
|
||||
* S25FL512S memory (configuration, commands, registers).
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup S25FL512S_Exported_Types
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/** @defgroup S25FL512S_Exported_Constants
|
||||
* @{
|
||||
*/
|
||||
|
||||
/* S25FL512SAGMFI01 Spansion Memory */
|
||||
/**
|
||||
* @brief S25FL512S Configuration
|
||||
*/
|
||||
#define S25FL512S_FLASH_SIZE 0x4000000 /* 512 MBits => 64MBytes */
|
||||
#define S25FL512S_SECTOR_SIZE 0x40000 /* 256 sectors of 256KBytes */
|
||||
#define S25FL512S_PAGE_SIZE 0x200 /* 131072 pages of 512 bytes */
|
||||
|
||||
#define S25FL512S_BULK_ERASE_MAX_TIME 460000
|
||||
#define S25FL512S_SECTOR_ERASE_MAX_TIME 2600
|
||||
|
||||
|
||||
/**
|
||||
* @brief S25FL512S Commands
|
||||
*/
|
||||
/* Reset Operations */
|
||||
#define S25FL512S_SOFTWARE_RESET_CMD 0xF0
|
||||
#define S25FL512S_MODE_BIT_RESET_CMD 0xFF
|
||||
|
||||
/* Identification Operations */
|
||||
#define S25FL512S_READ_ID_CMD 0x90
|
||||
#define S25FL512S_READ_ID_CMD2 0x9F
|
||||
#define S25FL512S_READ_ELECTRONIC_SIGNATURE 0xAB
|
||||
#define S25FL512S_READ_SERIAL_FLASH_DISCO_PARAM_CMD 0x5A
|
||||
|
||||
/* Register Operations */
|
||||
#define S25FL512S_READ_STATUS_REG1_CMD 0x05
|
||||
#define S25FL512S_READ_STATUS_REG2_CMD 0x07
|
||||
#define S25FL512S_READ_CONFIGURATION_REG1_CMD 0x35
|
||||
#define S25FL512S_WRITE_STATUS_CMD_REG_CMD 0x01
|
||||
#define S25FL512S_WRITE_DISABLE_CMD 0x04
|
||||
#define S25FL512S_WRITE_ENABLE_CMD 0x06
|
||||
#define S25FL512S_CLEAR_STATUS_REG1_CMD 0x30
|
||||
#define S25FL512S_READ_AUTOBOOT_REG_CMD 0x14
|
||||
#define S25FL512S_WRITE_AUTOBOOT_REG_CMD 0x15
|
||||
#define S25FL512S_READ_BANK_REG_CMD 0x16
|
||||
#define S25FL512S_WRITE_BANK_REG_CMD 0x17
|
||||
#define S25FL512S_ACCESS_BANK_REG_CMD 0xB9
|
||||
#define S25FL512S_READ_DATA_LEARNING_PATTERN_CMD 0x41
|
||||
#define S25FL512S_PGM_NV_DATA_LEARNING_REG_CMD 0x43
|
||||
#define S25FL512S_WRITE_VOL_DATA_LEARNING_REG_CMD 0x4A
|
||||
|
||||
/* Read Operations */
|
||||
#define S25FL512S_READ_CMD 0x03
|
||||
#define S25FL512S_READ_4_BYTE_ADDR_CMD 0x13
|
||||
|
||||
#define S25FL512S_FAST_READ_CMD 0x0B
|
||||
#define S25FL512S_FAST_READ_4_BYTE_ADDR_CMD 0x0C
|
||||
#define S25FL512S_FAST_READ_DDR_CMD 0x0D
|
||||
#define S25FL512S_FAST_READ__DDR_4_BYTE_ADDR_CMD 0x0E
|
||||
|
||||
#define S25FL512S_DUAL_OUT_FAST_READ_CMD 0x3B
|
||||
#define S25FL512S_DUAL_OUT_FAST_READ_4_BYTE_ADDR_CMD 0x3C
|
||||
|
||||
#define S25FL512S_QUAD_OUT_FAST_READ_CMD 0x6B
|
||||
#define S25FL512S_QUAD_OUT_FAST_READ_4_BYTE_ADDR_CMD 0x6C
|
||||
|
||||
#define S25FL512S_DUAL_INOUT_FAST_READ_CMD 0xBB
|
||||
#define S25FL512S_DUAL_INOUT_FAST_READ_DTR_CMD 0xBD
|
||||
#define S25FL512S_DUAL_INOUT_FAST_READ_4_BYTE_ADDR_CMD 0xBC
|
||||
#define S25FL512S_DDR_DUAL_INOUT_READ_4_BYTE_ADDR_CMD 0xBE
|
||||
|
||||
#define S25FL512S_QUAD_INOUT_FAST_READ_CMD 0xEB
|
||||
#define S25FL512S_QUAD_INOUT_FAST_READ_4_BYTE_ADDR_CMD 0xEC
|
||||
#define S25FL512S_QUAD_INOUT_FAST_READ_DDR_CMD 0xED
|
||||
#define S25FL512S_QUAD_INOUT_READ_DDR_4_BYTE_ADDR_CMD 0xEE
|
||||
|
||||
|
||||
/* Program Operations */
|
||||
#define S25FL512S_PAGE_PROG_CMD 0x02
|
||||
#define S25FL512S_PAGE_PROG_4_BYTE_ADDR_CMD 0x12
|
||||
|
||||
#define S25FL512S_QUAD_IN_FAST_PROG_CMD 0x32
|
||||
#define S25FL512S_QUAD_IN_FAST_PROG_ALTERNATE_CMD 0x38
|
||||
#define S25FL512S_QUAD_IN_FAST_PROG_4_BYTE_ADDR_CMD 0x34
|
||||
|
||||
#define S25FL512S_PROGRAM_SUSPEND_CMD 0x85
|
||||
#define S25FL512S_PROGRAM_RESUME_CMD 0x8A
|
||||
|
||||
/* Erase Operations */
|
||||
#define S25FL512S_SECTOR_ERASE_CMD 0xD8
|
||||
#define S25FL512S_SECTOR_ERASE_4_BYTE_ADDR_CMD 0xDC
|
||||
|
||||
#define S25FL512S_BULK_ERASE_CMD 0x60
|
||||
#define S25FL512S_BULK_ERASE_ALTERNATE_CMD 0xC7
|
||||
|
||||
#define S25FL512S_PROG_ERASE_SUSPEND_CMD 0x75
|
||||
#define S25FL512S_PROG_ERASE_RESUME_CMD 0x7A
|
||||
|
||||
/* One-Time Programmable Operations */
|
||||
#define S25FL512S_PROG_OTP_ARRAY_CMD 0x42
|
||||
#define S25FL512S_READ_OTP_ARRAY_CMD 0x4B
|
||||
|
||||
/* Advanced Sector Protection Operations */
|
||||
#define S25FL512S_READ_DYB_CMD 0xE0
|
||||
#define S25FL512S_WRITE_DYB_CMD 0xE1
|
||||
|
||||
#define S25FL512S_READ_PPB_CMD 0xE2
|
||||
#define S25FL512S_PROGRAM_PPB_CMD 0xE3
|
||||
#define S25FL512S_ERASE_PPB_CMD 0xE4
|
||||
|
||||
#define S25FL512S_READ_ASP_CMD 0x2B
|
||||
#define S25FL512S_PROGRAM_ASP_CMD 0x2F
|
||||
|
||||
#define S25FL512S_READ_PPB_LOCKBIT_CMD 0xA7
|
||||
#define S25FL512S_WRITE_PPB_LOCKBIT_CMD 0xA6
|
||||
|
||||
#define S25FL512S_READ_PASSWORD_CMD 0xE7
|
||||
#define S25FL512S_PROGRAM_PASSWORD_CMD 0xE8
|
||||
#define S25FL512S_UNLOCK_PASSWORD_CMD 0xE9
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @brief S25FL512S Registers
|
||||
*/
|
||||
/* Status Register-1 */
|
||||
#define S25FL512S_SR1_WIP ((uint8_t)0x01) /*!< Write in progress, device busy */
|
||||
#define S25FL512S_SR1_WREN ((uint8_t)0x02) /*!< Write Registers, program or commands are accepted */
|
||||
#define S25FL512S_SR1_BP0 ((uint8_t)0x04) /*!< Sector0 protected from Program or Erase */
|
||||
#define S25FL512S_SR1_BP1 ((uint8_t)0x08) /*!< Sector1 protected from Program or Erase */
|
||||
#define S25FL512S_SR1_BP2 ((uint8_t)0x10) /*!< Sector2 protected from Program or Erase */
|
||||
#define S25FL512S_SR1_ERERR ((uint8_t)0x20) /*!< Erase error */
|
||||
#define S25FL512S_SR1_PGERR ((uint8_t)0x40) /*!< Program error */
|
||||
#define S25FL512S_SR1_SRWD ((uint8_t)0x80) /*!< Status Register Write Disable */
|
||||
|
||||
/* Status Register-2 */
|
||||
#define S25FL512S_SR2_PS ((uint8_t)0x01) /*!< Program in Suspend mode */
|
||||
#define S25FL512S_SR2_ES ((uint8_t)0x02) /*!< Erase Suspend Mode */
|
||||
|
||||
/* Configuration Register CR1 */
|
||||
#define S25FL512S_CR1_FREEZE ((uint8_t)0x01) /*!< Block protection and OTP locked */
|
||||
#define S25FL512S_CR1_QUAD ((uint8_t)0x02) /*!< Quad mode enable */
|
||||
#define S25FL512S_CR1_BPNV ((uint8_t)0x08) /*!< BP2-0 bits of Status Reg are volatile */
|
||||
#define S25FL512S_CR1_TBPROT ((uint8_t)0x20) /*!< BPstarts at bottom */
|
||||
#define S25FL512S_CR1_LC_MASK ((uint8_t)0xC0) /*!< Latency Code mask */
|
||||
#define S25FL512S_CR1_LC0 ((uint8_t)0x00) /*!< Latency Code = 0 */
|
||||
#define S25FL512S_CR1_LC1 ((uint8_t)0x40) /*!< Latency Code = 1 */
|
||||
#define S25FL512S_CR1_LC2 ((uint8_t)0x80) /*!< Latency Code = 2 */
|
||||
#define S25FL512S_CR1_LC3 ((uint8_t)0xC0) /*!< Latency Code = 3 */
|
||||
|
||||
/* AutoBoot Register */
|
||||
#define S25FL512S_AB_EN ((uint32_t)0x00000001) /*!< AutoBoot Enabled */
|
||||
#define S25FL512S_AB_SD_MASK ((uint32_t)0x000001FE) /*!< AutoBoot Start Delay mask */
|
||||
#define S25FL512S_AB_SA_MASK ((uint32_t)0xFFFFFE00) /*!< AutoBoot Start Address mask */
|
||||
|
||||
/* Bank Address Register */
|
||||
#define S25FL512S_BA_BA24 ((uint8_t)0x01) /*!< A24 for 512 Mb device */
|
||||
#define S25FL512S_BA_BA25 ((uint8_t)0x02) /*!< A25 for 512 Mb device */
|
||||
#define S25FL512S_BA_EXTADD ((uint8_t)0x80) /*!< 4 bytes addressing required from command */
|
||||
|
||||
/* ASP Register */
|
||||
#define S25FL512S_ASP_PSTMLB ((uint16_t)0x0002) /*!< Persistent protection mode not permanently enabled */
|
||||
#define S25FL512S_ASP_PWSMLB ((uint16_t)0x0003) /*!< Password protection mode not permanently enabled */
|
||||
|
||||
/* PPB Lock Register */
|
||||
#define S25FL512S_PPBLOCK ((uint8_t)0x01) /*!< PPB array may be programmed or erased */
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/** @defgroup S25FL512S_Exported_Functions
|
||||
* @{
|
||||
*/
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __S25FL512S_H */
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
Reference in New Issue
Block a user