nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches
pcd.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2020 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
6
23#ifndef PCD_H__
24#define PCD_H__
25
26#include <zephyr/device.h>
27#include <sys/types.h>
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
33#ifdef CONFIG_SOC_SERIES_NRF53X
34
35#ifdef CONFIG_PCD_CMD_ADDRESS
36
37#define PCD_CMD_ADDRESS CONFIG_PCD_CMD_ADDRESS
38
39#else
40
41#include <pm_config.h>
42
43#ifdef PM_PCD_SRAM_ADDRESS
44#define PCD_CMD_ADDRESS PM_PCD_SRAM_ADDRESS
45#else
46/* extra '_' since its in a different domain */
47#define PCD_CMD_ADDRESS PM__PCD_SRAM_ADDRESS
48#endif /* PM_PCD_SRAM_ADDRESS */
49
50#endif /* CONFIG_PCD_CMD_ADDRESS */
51
52#endif /* CONFIG_SOC_SERIES_NRF53X */
53
59};
60
71int pcd_network_core_update(const void *src_addr, size_t len);
72
87int pcd_network_core_update_initiate(const void *src_addr, size_t len);
88
91void pcd_lock_ram(void);
92
96void pcd_done(void);
97
101
109
114const void *pcd_cmd_data_ptr_get(void);
115
125int pcd_fw_copy(const struct device *fdev);
126
127#ifdef CONFIG_PCD_READ_NETCORE_APP_VERSION
135int pcd_network_core_app_version(uint8_t *buf, size_t len);
136
143int pcd_find_fw_version(void);
144#endif /* CONFIG_PCD_READ_NETCORE_APP_VERSION */
145
146#ifdef __cplusplus
147}
148#endif
149
150#endif /* PCD_H__ */
151
int pcd_network_core_update(const void *src_addr, size_t len)
Sets up the PCD command structure with the location and size of the firmware update....
pcd_status
Definition: pcd.h:54
@ PCD_STATUS_FAILED
Definition: pcd.h:57
@ PCD_STATUS_READ_VERSION
Definition: pcd.h:58
@ PCD_STATUS_COPY
Definition: pcd.h:55
@ PCD_STATUS_DONE
Definition: pcd.h:56
void pcd_fw_copy_invalidate(void)
Invalidate the PCD CMD, indicating that the copy failed.
void pcd_lock_ram(void)
Lock the RAM section used for IPC with the network core bootloader.
void pcd_done(void)
Update the PCD CMD to indicate that the operation has completed successfully.
int pcd_fw_copy(const struct device *fdev)
Perform the DFU image transfer.
int pcd_network_core_update_initiate(const void *src_addr, size_t len)
Sets up the PCD command structure with the location and size of the firmware update....
const void * pcd_cmd_data_ptr_get(void)
Get value of 'data' member of pcd cmd.
enum pcd_status pcd_fw_copy_status_get(void)
Check the PCD CMD to find the status of the update.