diff --git a/os/hal/ports/STM32/STM32F0xx/stm32_registry.h b/os/hal/ports/STM32/STM32F0xx/stm32_registry.h
index 72d5a30..c0bb8b0 100644
--- a/os/hal/ports/STM32/STM32F0xx/stm32_registry.h
+++ b/os/hal/ports/STM32/STM32F0xx/stm32_registry.h
@@ -213,6 +213,7 @@
 #define STM32_HAS_ADC4                      FALSE
 
 /* CAN attributes.*/
+/* XXXX STM32F042 has CAN */
 #define STM32_HAS_CAN1                      FALSE
 #define STM32_HAS_CAN2                      FALSE
 
@@ -228,6 +229,7 @@
 #define STM32_HAS_ETH                       FALSE
 
 /* EXTI attributes.*/
+/* XXX STM32F042 has EXTI channel numbers up to 31. nr 29 and 30 are unused though! */
 #define STM32_EXTI_NUM_CHANNELS             28
 
 /* GPIO attributes.*/
@@ -268,7 +270,10 @@
 #define STM32_SPI_SPI1_RX_DMA_STREAM        STM32_DMA_STREAM_ID(1, 2)
 #define STM32_SPI_SPI1_TX_DMA_STREAM        STM32_DMA_STREAM_ID(1, 3)
 
-#define STM32_HAS_SPI2                      FALSE
+#define STM32_HAS_SPI2                      TRUE
+#define STM32_SPI_SPI2_RX_DMA_STREAM        STM32_DMA_STREAM_ID(1, 4)
+#define STM32_SPI_SPI2_TX_DMA_STREAM        STM32_DMA_STREAM_ID(1, 5)
+
 #define STM32_HAS_SPI3                      FALSE
 #define STM32_HAS_SPI4                      FALSE
 #define STM32_HAS_SPI5                      FALSE
@@ -317,17 +322,35 @@
 
 /* USART attributes.*/
 #define STM32_HAS_USART1                    TRUE
+/* XXX STM32F042 manual notes: 
+   DMA request mapped on this DMA channel only if the corresponding remapping bit is cleared 
+   in the SYSCFG_CFGR1 register. 
+   Otherwise the streams are 5 and 4 respectively */ 
 #define STM32_UART_USART1_RX_DMA_STREAM     STM32_DMA_STREAM_ID(1, 3)
 #define STM32_UART_USART1_TX_DMA_STREAM     STM32_DMA_STREAM_ID(1, 2)
 
+
+#if defined(STM32F042x6) 
+#define STM32_HAS_USART2                    TRUE
+#define STM32_UART_USART2_RX_DMA_STREAM     STM32_DMA_STREAM_ID(1, 5)
+#define STM32_UART_USART2_TX_DMA_STREAM     STM32_DMA_STREAM_ID(1, 4)
+#else
 #define STM32_HAS_USART2                    FALSE
+#endif
 #define STM32_HAS_USART3                    FALSE
 #define STM32_HAS_UART4                     FALSE
 #define STM32_HAS_UART5                     FALSE
 #define STM32_HAS_USART6                    FALSE
 
 /* USB attributes.*/
+#if defined(STM32F042x6) 
+#define STM32_HAS_USB                       TRUE
+#define STM32_USB_ACCESS_SCHEME_2x16        TRUE
+#define STM32_USB_PMA_SIZE                  768
+#define STM32_USB_HAS_BCDR                  TRUE
+#else
 #define STM32_HAS_USB                       FALSE
+#endif
 #define STM32_HAS_OTG1                      FALSE
 #define STM32_HAS_OTG2                      FALSE
 
