Repostiory containing DAPLink source code with Reset Pin workaround for HANI_IOT board.

Upstream: https://github.com/ARMmbed/DAPLink

Committer:
Pawel Zarembski
Date:
Tue Apr 07 12:55:42 2020 +0200
Revision:
0:01f31e923fe2
hani: DAPLink with reset workaround

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Pawel Zarembski 0:01f31e923fe2 1 /* Flash OS Routines (Automagically Generated)
Pawel Zarembski 0:01f31e923fe2 2 * Copyright (c) 2009-2019 ARM Limited
Pawel Zarembski 0:01f31e923fe2 3 *
Pawel Zarembski 0:01f31e923fe2 4 * Licensed under the Apache License, Version 2.0 (the "License");
Pawel Zarembski 0:01f31e923fe2 5 * you may not use this file except in compliance with the License.
Pawel Zarembski 0:01f31e923fe2 6 * You may obtain a copy of the License at
Pawel Zarembski 0:01f31e923fe2 7 *
Pawel Zarembski 0:01f31e923fe2 8 * http://www.apache.org/licenses/LICENSE-2.0
Pawel Zarembski 0:01f31e923fe2 9 *
Pawel Zarembski 0:01f31e923fe2 10 * Unless required by applicable law or agreed to in writing, software
Pawel Zarembski 0:01f31e923fe2 11 * distributed under the License is distributed on an "AS IS" BASIS,
Pawel Zarembski 0:01f31e923fe2 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Pawel Zarembski 0:01f31e923fe2 13 * See the License for the specific language governing permissions and
Pawel Zarembski 0:01f31e923fe2 14 * limitations under the License.
Pawel Zarembski 0:01f31e923fe2 15 */
Pawel Zarembski 0:01f31e923fe2 16
Pawel Zarembski 0:01f31e923fe2 17 static const uint32_t STM32F429ZI_flash_prog_blob[] = {
Pawel Zarembski 0:01f31e923fe2 18 0xE00ABE00, 0x062D780D, 0x24084068, 0xD3000040, 0x1E644058, 0x1C49D1FA, 0x2A001E52, 0x4770D1F2,
Pawel Zarembski 0:01f31e923fe2 19 0x03004601, 0x28200e00, 0x0940d302, 0xe0051d00, 0xd3022810, 0x1cc00900, 0x0880e000, 0xd50102c9,
Pawel Zarembski 0:01f31e923fe2 20 0x43082110, 0x48464770, 0x60414944, 0x60414945, 0x60012100, 0x22f068c1, 0x60c14311, 0x06806940,
Pawel Zarembski 0:01f31e923fe2 21 0x4842d406, 0x60014940, 0x60412106, 0x60814940, 0x47702000, 0x6901483a, 0x43110542, 0x20006101,
Pawel Zarembski 0:01f31e923fe2 22 0xb5304770, 0x69014836, 0x43212404, 0x69016101, 0x43290365, 0x69016101, 0x431103a2, 0x49356101,
Pawel Zarembski 0:01f31e923fe2 23 0xe0004a32, 0x68c36011, 0xd4fb03db, 0x43a16901, 0x69016101, 0x610143a9, 0xbd302000, 0xf7ffb530,
Pawel Zarembski 0:01f31e923fe2 24 0x4927ffaf, 0x23f068ca, 0x60ca431a, 0x610c2402, 0x06c0690a, 0x43020e00, 0x6908610a, 0x431003e2,
Pawel Zarembski 0:01f31e923fe2 25 0x48246108, 0xe0004a21, 0x68cd6010, 0xd4fb03ed, 0x43a06908, 0x68c86108, 0x0f000600, 0x68c8d003,
Pawel Zarembski 0:01f31e923fe2 26 0x60c84318, 0xbd302001, 0x4d15b570, 0x08891cc9, 0x008968eb, 0x433326f0, 0x230060eb, 0x4b16612b,
Pawel Zarembski 0:01f31e923fe2 27 0x692ce017, 0x612c431c, 0x60046814, 0x03e468ec, 0x692cd4fc, 0x00640864, 0x68ec612c, 0x0f240624,
Pawel Zarembski 0:01f31e923fe2 28 0x68e8d004, 0x60e84330, 0xbd702001, 0x1d121d00, 0x29001f09, 0x2000d1e5, 0x0000bd70, 0x45670123,
Pawel Zarembski 0:01f31e923fe2 29 0x40023c00, 0xcdef89ab, 0x00005555, 0x40003000, 0x00000fff, 0x0000aaaa, 0x00000201, 0x00000000
Pawel Zarembski 0:01f31e923fe2 30 };
Pawel Zarembski 0:01f31e923fe2 31
Pawel Zarembski 0:01f31e923fe2 32 /**
Pawel Zarembski 0:01f31e923fe2 33 * @brief List of start and size for each size of flash sector.
Pawel Zarembski 0:01f31e923fe2 34 *
Pawel Zarembski 0:01f31e923fe2 35 * Even indexes are start, odd are size. The size will apply to all sectors between the listed
Pawel Zarembski 0:01f31e923fe2 36 * address and the next address in the list. The last pair in the list will have sectors starting
Pawel Zarembski 0:01f31e923fe2 37 * at that address and ending at address flash_start + flash_size.
Pawel Zarembski 0:01f31e923fe2 38 */
Pawel Zarembski 0:01f31e923fe2 39 static const sector_info_t sectors_info[] = {
Pawel Zarembski 0:01f31e923fe2 40 { 0x08000000, 0x00004000 }, // 4 x 16KB
Pawel Zarembski 0:01f31e923fe2 41 { 0x08010000, 0x00010000 }, // 1 x 64KB
Pawel Zarembski 0:01f31e923fe2 42 { 0x08020000, 0x00020000 }, // 7 x 128KB
Pawel Zarembski 0:01f31e923fe2 43 };
Pawel Zarembski 0:01f31e923fe2 44
Pawel Zarembski 0:01f31e923fe2 45 static const program_target_t flash = {
Pawel Zarembski 0:01f31e923fe2 46 0x20000047, // Init
Pawel Zarembski 0:01f31e923fe2 47 0x20000075, // UnInit
Pawel Zarembski 0:01f31e923fe2 48 0x20000083, // EraseChip
Pawel Zarembski 0:01f31e923fe2 49 0x200000bd, // EraseSector
Pawel Zarembski 0:01f31e923fe2 50 0x20000109, // ProgramPage
Pawel Zarembski 0:01f31e923fe2 51 0x0, // Verify
Pawel Zarembski 0:01f31e923fe2 52
Pawel Zarembski 0:01f31e923fe2 53 // BKPT : start of blob + 1
Pawel Zarembski 0:01f31e923fe2 54 // RSB : blob start + header + rw data offset
Pawel Zarembski 0:01f31e923fe2 55 // RSP : stack pointer
Pawel Zarembski 0:01f31e923fe2 56 {
Pawel Zarembski 0:01f31e923fe2 57 0x20000001,
Pawel Zarembski 0:01f31e923fe2 58 0x2000017c,
Pawel Zarembski 0:01f31e923fe2 59 0x20000800
Pawel Zarembski 0:01f31e923fe2 60 },
Pawel Zarembski 0:01f31e923fe2 61
Pawel Zarembski 0:01f31e923fe2 62 0x20000000 + 0x00000A00, // mem buffer location
Pawel Zarembski 0:01f31e923fe2 63 0x20000000, // location to write prog_blob in target RAM
Pawel Zarembski 0:01f31e923fe2 64 sizeof(STM32F429ZI_flash_prog_blob), // prog_blob size
Pawel Zarembski 0:01f31e923fe2 65 STM32F429ZI_flash_prog_blob, // address of prog_blob
Pawel Zarembski 0:01f31e923fe2 66 0x00000400 // ram_to_flash_bytes_to_be_written
Pawel Zarembski 0:01f31e923fe2 67 };