diff --git a/cores/nRF5/debug.cpp b/cores/nRF5/debug.cpp index 30009ffe..f77549b7 100644 --- a/cores/nRF5/debug.cpp +++ b/cores/nRF5/debug.cpp @@ -225,7 +225,7 @@ const char* dbg_ble_event_str(uint16_t evt_id) return _gatts_evt_str[evt_id-BLE_GATTS_EVT_BASE]; else { - sprintf(unknown_evt, "0x04X", evt_id); + sprintf(unknown_evt, "0x%04X", evt_id); return unknown_evt; } } diff --git a/cores/nRF5/wiring_analog_nRF52.c b/cores/nRF5/wiring_analog_nRF52.c index 9051d326..18e8a378 100644 --- a/cores/nRF5/wiring_analog_nRF52.c +++ b/cores/nRF5/wiring_analog_nRF52.c @@ -243,7 +243,7 @@ void analogWrite( uint32_t ulPin, uint32_t ulValue ) for (int i = 0; i < PWM_COUNT; i++) { if (pwmChannelPins[i] == 0xFFFFFFFF || pwmChannelPins[i] == ulPin) { pwmChannelPins[i] = ulPin; - pwmChannelSequence[i] = ulValue; + pwmChannelSequence[i] = bit(15) | ulValue; NRF_PWM_Type* pwm = pwms[i];