mirror of https://github.com/ARMmbed/mbed-os.git
Update after hex enabled firmware release
Removed SystemInit write to FWID. Added DEVICE_ERROR_PATTERN for error signaling. Exception for NRF added to board.c to keep irqs enabled since timer irq is needed for the wait function. Button pin names changed from BUTTON0 to BUTTON1 and from BUTTON1 to BUTTON2.pull/219/head
parent
2dfdee5fe4
commit
0f68519f85
|
@ -19,7 +19,9 @@
|
|||
|
||||
WEAK void mbed_die(void);
|
||||
WEAK void mbed_die(void) {
|
||||
#ifndef NRF51_H
|
||||
__disable_irq(); // dont allow interrupts to disturb the flash pattern
|
||||
#endif
|
||||
|
||||
#if (DEVICE_ERROR_RED == 1)
|
||||
gpio_t led_red; gpio_init(&led_red, LED_RED, PIN_OUTPUT);
|
||||
|
|
|
@ -44,24 +44,11 @@ void SystemCoreClockUpdate(void)
|
|||
|
||||
void SystemInit(void)
|
||||
{
|
||||
NRF_NVMC->CONFIG = (NVMC_CONFIG_WEN_Wen << NVMC_CONFIG_WEN_Pos);
|
||||
while (NRF_NVMC->READY == NVMC_READY_READY_Busy){
|
||||
}
|
||||
//write FWID (NRF_UICR->FWID is readonly)
|
||||
*(uint32_t *)0x10001010 = 0xFFFF0049;
|
||||
|
||||
while (NRF_NVMC->READY == NVMC_READY_READY_Busy){
|
||||
}
|
||||
|
||||
NRF_NVMC->CONFIG = (NVMC_CONFIG_WEN_Ren << NVMC_CONFIG_WEN_Pos);
|
||||
while (NRF_NVMC->READY == NVMC_READY_READY_Busy){
|
||||
}
|
||||
// Prepare the peripherals for use as indicated by the PAN 26 "System: Manual setup is required
|
||||
// to enable the use of peripherals" found at Product Anomaly document for your device found at
|
||||
// https://www.nordicsemi.com/. The side effect of executing these instructions in the devices
|
||||
// that do not need it is that the new peripherals in the second generation devices (LPCOMP for
|
||||
// example) will not be available.
|
||||
|
||||
if (is_manual_peripheral_setup_needed()){
|
||||
*(uint32_t volatile *)0x40000504 = 0xC007FFDF;
|
||||
*(uint32_t volatile *)0x40006C18 = 0x00008000;
|
||||
|
|
|
@ -103,8 +103,8 @@ typedef enum {
|
|||
LED3 = p18,
|
||||
LED4 = p19,
|
||||
|
||||
BUTTON0 = p16,
|
||||
BUTTON1 = p17,
|
||||
BUTTON1 = p16,
|
||||
BUTTON2 = p17,
|
||||
|
||||
RX_PIN_NUMBER = p11,
|
||||
TX_PIN_NUMBER = p9,
|
||||
|
|
|
@ -50,6 +50,8 @@
|
|||
|
||||
#define DEVICE_STDIO_MESSAGES 0
|
||||
|
||||
#define DEVICE_ERROR_PATTERN 1
|
||||
|
||||
#include "objects.h"
|
||||
|
||||
#endif
|
||||
|
|
|
@ -29,6 +29,7 @@ volatile uint16_t timeStamp=0;
|
|||
extern "C" {
|
||||
#endif
|
||||
void TIMER1_IRQHandler(void){
|
||||
|
||||
if ((US_TICKER_TIMER->EVENTS_COMPARE[1] != 0) &&
|
||||
((US_TICKER_TIMER->INTENSET & TIMER_INTENSET_COMPARE1_Msk) != 0))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue