Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
FlashPrg.h File Reference
DAPLink Interface Firmware Copyright (c) 2009-2016, ARM Limited, All Rights Reserved SPDX-License-Identifier: Apache-2.0. More...
Go to the source code of this file.
Functions | |
uint32_t | Init (uint32_t adr, uint32_t clk, uint32_t fnc) |
Initialize programming functions. | |
uint32_t | UnInit (uint32_t fnc) |
De-Initialize programming functions [optional]. | |
uint32_t | BlankCheck (uint32_t adr, uint32_t sz, uint8_t pat) |
Check region for erased memory. | |
uint32_t | EraseChip (void) |
Perform a full chip erase. | |
uint32_t | EraseSector (uint32_t adr) |
Erase a single sector of memory. | |
uint32_t | ProgramPage (uint32_t adr, uint32_t sz, uint32_t *buf) |
Program data into memory. | |
uint32_t | Verify (uint32_t adr, uint32_t sz, uint32_t *buf) |
Verify contents in memory. |
Detailed Description
DAPLink Interface Firmware Copyright (c) 2009-2016, ARM Limited, All Rights Reserved SPDX-License-Identifier: Apache-2.0.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Definition in file FlashPrg.h.
Function Documentation
uint32_t BlankCheck | ( | uint32_t | adr, |
uint32_t | sz, | ||
uint8_t | pat | ||
) |
Check region for erased memory.
- Parameters:
-
adr address to start from sz the amount of memory to check pat the pattern of erased memory (usually 0xff)
- Returns:
- 0 on success, an error code otherwise
uint32_t EraseChip | ( | void | ) |
Perform a full chip erase.
- Returns:
- 0 on success, an error code otherwise
Definition at line 101 of file freescale/iap/FlashPrg.c.
uint32_t EraseSector | ( | uint32_t | adr ) |
Erase a single sector of memory.
- Parameters:
-
adr address of a sector to erase
- Returns:
- 0 on success, an error code otherwise
Definition at line 118 of file freescale/iap/FlashPrg.c.
uint32_t Init | ( | uint32_t | adr, |
uint32_t | clk, | ||
uint32_t | fnc | ||
) |
Initialize programming functions.
- Parameters:
-
adr device base address clk clock frequency (Hz) fnc function code (1 - Erase, 2 - Program, 3 - Verify)
- Returns:
- 0 on success, an error code otherwise
Definition at line 29 of file freescale/iap/FlashPrg.c.
uint32_t ProgramPage | ( | uint32_t | adr, |
uint32_t | sz, | ||
uint32_t * | buf | ||
) |
Program data into memory.
- Parameters:
-
adr address to start programming from sz the amount of data to program buf memory contents to be programmed
- Returns:
- 0 on success, an error code otherwise
Definition at line 137 of file freescale/iap/FlashPrg.c.
uint32_t UnInit | ( | uint32_t | fnc ) |
De-Initialize programming functions [optional].
- Parameters:
-
fnc function code (1 - Erase, 2 - Program, 3 - Verify)
- Returns:
- 0 on success, an error code otherwise
Definition at line 54 of file freescale/iap/FlashPrg.c.
uint32_t Verify | ( | uint32_t | adr, |
uint32_t | sz, | ||
uint32_t * | buf | ||
) |
Verify contents in memory.
- Parameters:
-
adr start address of the verification sz the amount of data to be verified buf memory contents to be compared against
- Returns:
- 0 on success, an error code otherwise
Generated on Tue Jul 12 2022 15:37:28 by
