This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Pro: The nrfx drivers keep track of which PPI and GPIOTE channels are in used. | |
static void alloc_assign_enable_nrfx_ppi(nrf_ppi_channel_t* p_channel, | |
uint32_t event_end_point, | |
uint32_t task_end_point) | |
{ | |
#if (!NRFX_PPI_ENABLED) | |
#error "Require enabling NRFX_PPI_ENABLED in sdk_config.h. In nRF5 SDK, also check PPI_ENABLED (refer to apply_old_config.h)" | |
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <zephyr/kernel.h> | |
#include <hal/nrf_gpio.h> | |
#define PRINTK_MACRO(_MMACRO) printk(#_MMACRO "\n\tDecimal: %d\n\tHex: 0x%08x\n", _MMACRO, _MMACRO); | |
// Explanation | |
// The relevant DTS lines we want to look at are | |
// In nrf52840dk_nrf52840.dts: | |
// aliases { | |
// led0 = &led0; | |
// ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add MCUboot and DFU over UART to application | |
# Applicable for NCS 2.4.0+ | |
CONFIG_BOOTLOADER_MCUBOOT=y | |
CONFIG_MCUMGR=y | |
CONFIG_MCUMGR_GRP_IMG=y | |
# DFU over UART | |
CONFIG_MCUMGR_TRANSPORT_UART=y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@set app_hex=C:\_AAA\nRF5_SDK_17.1.0_ddde560\_AAA\_AAA\project\ble_app_buttonless_dfu\pca10040\s132\ses\Output\Debug\Exe\ble_app_buttonless_dfu_pca10040_s132.hex | |
@set bl_hex=C:\_AAA\nRF5_SDK_17.1.0_ddde560\_AAA\_AAA\secure_bootloader\pca10040_uart_debug\ses\Output\Release\Exe\secure_bootloader_uart_mbr_pca10040_debug.hex | |
@set sd_hex=C:\_AAA\nRF5_SDK_17.1.0_ddde560\components\softdevice\s132\hex\s132_nrf52_7.2.0_softdevice.hex | |
@call :CheckExist %app_hex% || exit | |
@call :CheckExist %bl_hex% || exit | |
@call :CheckExist %sd_hex% || exit |