sam3n kdebug: fix bug, enable correctly UART PMC.
[bertos.git] / bertos / cpu / cortex-m3 / drv / kdebug_sam3.c
index e3472395dbd36295aa377bcbd291e1d0bbeca780..ac062e46b7d53af4adf81b86414a811494227729 100644 (file)
@@ -81,7 +81,7 @@ INLINE void kdbg_hw_init(void)
        HWREG(UART_GPIO_BASE + GPIO_ABCDSR2) &= ~UART_PINS;
 
        /* Enable the peripheral clock */
-       PMC_PCER_R = UART_INT;
+       PMC_PCER_R |= BV(UART_INT);
 
        /* Reset and disable receiver & transmitter */
        HWREG(UART_BASE + UART_CR) = UART_CR_RSTRX | UART_CR_RSTTX | UART_CR_RXDIS | UART_CR_TXDIS;