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.
target_family.h File Reference
DAPLink Interface Firmware Copyright (c) 2018-2019, ARM Limited, All Rights Reserved SPDX-License-Identifier: Apache-2.0. More...
Go to the source code of this file.
Data Structures | |
struct | target_family_descriptor |
Defines all characteristics of a device family. More... | |
Typedefs | |
typedef enum _target_state | target_state_t |
States into which the target can be placed. | |
typedef enum _reset_type | reset_type_t |
Options for reset. | |
typedef enum _family_id | family_id_t |
Unique IDs for device families supported by DAPLink. | |
typedef struct target_family_descriptor | target_family_descriptor_t |
Defines all characteristics of a device family. | |
Enumerations | |
enum | _target_state { RESET_HOLD, RESET_PROGRAM, RESET_RUN, NO_DEBUG, DEBUG, HALT, RUN, POST_FLASH_RESET, POWER_ON, SHUTDOWN } |
States into which the target can be placed. More... | |
enum | _reset_type |
Options for reset. More... | |
enum | _vendor_ids |
Unique IDs for vendors. More... | |
enum | _family_id |
Unique IDs for device families supported by DAPLink. More... | |
Functions | |
void | init_family (void) |
Initialize g_target_family. | |
uint8_t | target_set_state (target_state_t state) |
Reset the target into a new state. | |
void | swd_set_target_reset (uint8_t asserted) |
Controls reset of the target. | |
uint32_t | target_get_apsel (void) |
Get the APSEL for the AHB-AP to use for controlling the target. | |
Variables | |
const target_family_descriptor_t * | g_target_family |
The active family used by the board. |
Detailed Description
DAPLink Interface Firmware Copyright (c) 2018-2019, 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 target_family.h.
Typedef Documentation
typedef enum _family_id family_id_t |
Unique IDs for device families supported by DAPLink.
The values of these enums are created with the VENDOR_TO_FAMILY() macro. Vendor IDs come from the _vendor_ids enumeration. The family index for each ID is simply an integer that is unique within the family.
There are several "stub" families defined with a stub vendor. These families are meant to be used for devices that do not require any customized behaviour in order to be successfully controlled by DAPLink. The individual stub families provide some options for what reset type should be used, either hardware or software.
To add a new family, first determine if you can simply use one of the stub families. For many devices, the stub families are sufficient and using them reduces complexity.
If you do need a new family ID, first check if the vendor is present in _vendor_ids. If not, add the vendor ID to that enum (see its documentation for the source of vendor ID values). Then pick a unique family index by adding 1 to the highest existing family index within that vendor. For a family with a new vendor, the family index should be 1.
typedef enum _reset_type reset_type_t |
Options for reset.
typedef struct target_family_descriptor target_family_descriptor_t |
Defines all characteristics of a device family.
typedef enum _target_state target_state_t |
States into which the target can be placed.
These enums are passed to target_set_state() and indicate the desired state into which the target should be reset.
Enumeration Type Documentation
enum _family_id |
Unique IDs for device families supported by DAPLink.
The values of these enums are created with the VENDOR_TO_FAMILY() macro. Vendor IDs come from the _vendor_ids enumeration. The family index for each ID is simply an integer that is unique within the family.
There are several "stub" families defined with a stub vendor. These families are meant to be used for devices that do not require any customized behaviour in order to be successfully controlled by DAPLink. The individual stub families provide some options for what reset type should be used, either hardware or software.
To add a new family, first determine if you can simply use one of the stub families. For many devices, the stub families are sufficient and using them reduces complexity.
If you do need a new family ID, first check if the vendor is present in _vendor_ids. If not, add the vendor ID to that enum (see its documentation for the source of vendor ID values). Then pick a unique family index by adding 1 to the highest existing family index within that vendor. For a family with a new vendor, the family index should be 1.
Definition at line 89 of file target_family.h.
enum _reset_type |
Options for reset.
Definition at line 49 of file target_family.h.
enum _target_state |
States into which the target can be placed.
These enums are passed to target_set_state() and indicate the desired state into which the target should be reset.
- Enumerator:
Definition at line 35 of file target_family.h.
enum _vendor_ids |
Unique IDs for vendors.
The vendor IDs are the same as those used for the _DeviceVendorEnum_ defined for the PDSC file format from CMSIS-Packs. See the [DeviceVendorEnum documentation](https://arm-software.github.io/CMSIS_5/Pack/html/pdsc_family_pg.html#DeviceVendorEnum) for the list of ID values.
Definition at line 60 of file target_family.h.
Function Documentation
void init_family | ( | void | ) |
Initialize g_target_family.
void swd_set_target_reset | ( | uint8_t | asserted ) |
Controls reset of the target.
Definition at line 145 of file target_family.c.
uint32_t target_get_apsel | ( | void | ) |
Get the APSEL for the AHB-AP to use for controlling the target.
Definition at line 154 of file target_family.c.
uint8_t target_set_state | ( | target_state_t | state ) |
Reset the target into a new state.
Used to prepare the target for some operation, or release it for user control.
Definition at line 38 of file maxim/max32620/target_reset.c.
Variable Documentation
The active family used by the board.
This global is initialized by init_family() just after DAPLink boots. Normally it matches the family specified by the board_info_t::family_id field of g_board_info.
Definition at line 56 of file k20dx_bl.c.
Generated on Tue Jul 12 2022 15:37:31 by
