Modification of mbed-src library only for STM32F030F4, very cheap microcontroller in 20-Pin TSSOP package, with 16Kbytes of Flash and 4Kbytes of Ram. **Target for online compilator must be Nucleo 32F030R8.** 01.02.2018 Acosinwork: Fork of mbed-STM32F030F4 library. Support for Troyka GPIO expander by Amperka. http://amperka.ru/product/troyka-gpio-expander
Fork of mbed-STM32F030F4 by
Revision 12:6f07dd7cbe47, committed 2018-02-01
- Comitter:
- acosinwork
- Date:
- Thu Feb 01 10:37:10 2018 +0000
- Parent:
- 11:79a2d67cd509
- Commit message:
- Change pin mapping and set internall oscillator as default. Fork to support Troyka GPIO expander (I2C I/O); http://amperka.ru/product/troyka-gpio-expander
Changed in this revision
--- a/targets/cmsis/TARGET_STM/TARGET_NUCLEO_F030R8/system_stm32f0xx.c Tue Feb 14 21:52:10 2017 +0000
+++ b/targets/cmsis/TARGET_STM/TARGET_NUCLEO_F030R8/system_stm32f0xx.c Thu Feb 01 10:37:10 2018 +0000
@@ -114,10 +114,10 @@
/** @addtogroup STM32F0xx_System_Private_Macros
* @{
*/
+/* Select the clock sources (other than HSI) to start with (0=OFF, 1=ON) */
-/* Select the clock sources (other than HSI) to start with (0=OFF, 1=ON) */
-#define USE_PLL_HSE_EXTC (1) /* Use external clock */
-#define USE_PLL_HSE_XTAL (1) /* Use external xtal */
+ #define USE_PLL_HSE_EXTC (0) /* Don't use external clock */
+ #define USE_PLL_HSE_XTAL (0) /* Don't use external xtal */
/**
* @}
--- a/targets/hal/TARGET_STM/TARGET_NUCLEO_F030R8/PinNames.h Tue Feb 14 21:52:10 2017 +0000
+++ b/targets/hal/TARGET_STM/TARGET_NUCLEO_F030R8/PinNames.h Thu Feb 01 10:37:10 2018 +0000
@@ -128,50 +128,40 @@
PF_7 = 0x57,
- // Arduino connector namings
- A0 = PA_0,
- A1 = PA_1,
- A2 = PA_4,
- A3 = PB_0,
- A4 = PC_1,
- A5 = PC_0,
- D0 = PA_3,
- D1 = PA_2,
- D2 = PA_10,
- D3 = PB_3,
- D4 = PB_5,
- D5 = PB_4,
- D6 = PB_10,
- D7 = PA_8,
- D8 = PA_9,
- D9 = PC_7,
- D10 = PB_6,
- D11 = PA_7,
- D12 = PA_6,
- D13 = PA_5,
- D14 = PB_9,
- D15 = PB_8,
-
+ // I2CIO connector namings
+ A0 = PB_1,
+ A1 = PA_7,
+ A2 = PA_6,
+ A3 = PA_5,
+ A4 = PA_0,
+ A5 = PA_1,
+ A6 = PA_2,
+ A7 = PA_4,
+ A8 = PA_3,
+ // PWM
+ D0 = PB_1,
+ D1 = PA_7,
+ D2 = PA_6,
+ D7 = PA_4,
+
// Generic signals namings
- LED1 = PA_5,
- LED2 = PA_5,
- LED3 = PA_5,
- LED4 = PA_5,
- USER_BUTTON = PA_0,//F4
- SERIAL_TX = PA_2,
- SERIAL_RX = PA_3,
- USBTX = PA_2,
- USBRX = PA_3,
- I2C_SCL = PA_9,//F4
- I2C_SDA = PA_10,//F4
+ LED1 = PF_1,
+ USER_BUTTON = PA_13,
+ SERIAL_TX = PA_9,
+ SERIAL_RX = PA_10,
+ USBTX = PA_9,
+ USBRX = PA_10,
+ I2C_SCL = PA_9,
+ I2C_SDA = PA_10,
SPI_MOSI = PA_7,
SPI_MISO = PA_6,
SPI_SCK = PA_5,
- SPI_CS = PA_4,//F4
- PWM_OUT = PB_1,//F4
+ SPI_CS = PA_4,
+ PWM_OUT = PB_1,
// Not connected
NC = (int)0xFFFFFFFF
+
} PinName;
typedef enum {
