nRF Connect SDK API 3.3.99
Loading...
Searching...
No Matches
pcd_common.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2024 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
6
17#ifndef PCD_COMMON_H__
18#define PCD_COMMON_H__
19
20#ifndef CONFIG_SOC_SERIES_NRF53
21#error "PCD is only supported on nRF53 series"
22#endif
23
25#define PCD_CMD_MAGIC_COPY 0xb5b4b3b6
27#define PCD_CMD_MAGIC_LOCK_DEBUG 0xb6f249ec
29#define PCD_CMD_MAGIC_FAIL 0x25bafc15
31#define PCD_CMD_MAGIC_DONE 0xf103ce5d
33#define PCD_CMD_MAGIC_READ_VERSION 0xdca345ea
34
35struct pcd_cmd {
36 uint32_t magic; /* Magic value to identify this structure in memory */
37 const void *data; /* Data to copy*/
38 size_t len; /* Number of bytes to copy */
39 __INTPTR_TYPE__ offset; /* Offset to store the flash image in */
40} __aligned(4);
41
42extern volatile struct pcd_cmd *pcd_cmd_p;
43
44static inline void pcd_write_cmd_lock_debug(void)
45{
46 *pcd_cmd_p = (struct pcd_cmd){
48 };
49}
50
51static inline bool pcd_read_cmd_done(void)
52{
54}
55
56static inline bool pcd_read_cmd_lock_debug(void)
57{
59}
60
61#endif /* PCD_COMMON_H__ */
62
static bool pcd_read_cmd_done(void)
Definition pcd_common.h:51
volatile struct pcd_cmd * pcd_cmd_p
static bool pcd_read_cmd_lock_debug(void)
Definition pcd_common.h:56
static void pcd_write_cmd_lock_debug(void)
Definition pcd_common.h:44
#define PCD_CMD_MAGIC_LOCK_DEBUG
Definition pcd_common.h:27
#define PCD_CMD_MAGIC_DONE
Definition pcd_common.h:31
const void * data
Definition pcd_common.h:37
__INTPTR_TYPE__ offset
Definition pcd_common.h:39
uint32_t magic
Definition pcd_common.h:36
size_t len
Definition pcd_common.h:38
Definition pcd_common.h:35