Skip to content

Commit 103c0d7

Browse files
author
Jan Kamidra
committed
Necessary fixes
1 parent cb5c3a1 commit 103c0d7

File tree

5 files changed

+33
-20
lines changed

5 files changed

+33
-20
lines changed

targets/TARGET_STM/TARGET_STM32U0/PeripheralNames.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ typedef enum {
5151
#define DEVICE_SPI_COUNT 3
5252
typedef enum {
5353
SPI_1 = (int)SPI1_BASE,
54-
#if SPI3_BASE
54+
#if SPI2_BASE
5555
SPI_2 = (int)SPI2_BASE,
5656
#endif
5757
#if SPI3_BASE

targets/TARGET_STM/i2c_api.c

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2172,6 +2172,25 @@ uint32_t i2c_get_timing(I2CName i2c, uint32_t current_timing, int current_hz,
21722172
}
21732173
break;
21742174
#endif
2175+
#if defined (I2C_PCLK_56M)
2176+
case I2C_PCLK_56M:
2177+
switch (hz) {
2178+
case 100000:
2179+
tim = TIMING_VAL_56M_CLK_100KHZ;
2180+
break;
2181+
case 400000:
2182+
tim = TIMING_VAL_56M_CLK_400KHZ;
2183+
break;
2184+
case 1000000:
2185+
tim = TIMING_VAL_56M_CLK_1MHZ;
2186+
break;
2187+
default:
2188+
MBED_ASSERT((hz == 100000) || (hz == 400000) || \
2189+
(hz == 1000000));
2190+
break;
2191+
}
2192+
break;
2193+
#endif
21752194
#if defined(I2C_PCLK_64M)
21762195
case I2C_PCLK_64M:
21772196
switch (hz) {

targets/TARGET_STM/lp_ticker.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ void lp_ticker_init(void)
266266
#if defined (LPTIM_ACTIVEEDGE_FALLING)
267267
LptimHandle.Init.Trigger.ActiveEdge = LPTIM_ACTIVEEDGE_FALLING;
268268
#endif
269-
#if defined(TARGET_STM32U5)
269+
#if defined(TARGET_STM32U5) || defined(TARGET_STM32U0)
270270
LptimHandle.Init.Period = 0xFFFF;
271271
#endif
272272
#if defined (LPTIM_TRIGSAMPLETIME_DIRECTTRANSITION)

targets/targets.json5

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4766,15 +4766,19 @@ mode is recommended for target MCUs with small amounts of flash and RAM.",
47664766
"extra_labels_add": [
47674767
"STM32U0"
47684768
],
4769-
//"macros_add": [
4770-
// "MBED_TICKLESS"
4771-
//],
4769+
"macros_add": [
4770+
"MBED_TICKLESS"
4771+
],
47724772
"config": {
47734773
"clock_source": {
47744774
"help": "Mask value : USE_PLL_HSE_EXTC (need HW patch) | USE_PLL_HSE_XTAL (need HW patch) | USE_PLL_HSI | USE_PLL_MSI",
47754775
"value": "USE_PLL_HSI",
47764776
"macro_name": "CLOCK_SOURCE"
47774777
},
4778+
"lse_drive_load_level": {
4779+
"help": "HSE drive load level RCC_LSEDRIVE_LOW | RCC_LSEDRIVE_MEDIUMLOW | RCC_LSEDRIVE_MEDIUMHIGH | RCC_LSEDRIVE_HIGH",
4780+
"value": "RCC_LSEDRIVE_LOW"
4781+
},
47784782
"lpticker_lptim": {
47794783
"help": "This target supports LPTIM. Set value 1 to use LPTIM for LPTICKER, or 0 to use RTC wakeup timer",
47804784
"value": 1
@@ -4793,7 +4797,8 @@ mode is recommended for target MCUs with small amounts of flash and RAM.",
47934797
"FLASH",
47944798
"MPU",
47954799
"ANALOGOUT",
4796-
"TRNG"
4800+
"TRNG",
4801+
"USB"
47974802
],
47984803
"is_mcu_family_target": true
47994804
},
@@ -4814,28 +4819,17 @@ mode is recommended for target MCUs with small amounts of flash and RAM.",
48144819
"MCU_STM32U083xC"
48154820
],
48164821
"overrides": {
4817-
"lse_available": 1,
48184822
"clock_source": "USE_PLL_HSI",
4823+
"lse_available": 1,
4824+
"default-adc-vref": 3.3
48194825
},
4820-
"device_has_remove": [
4821-
"I2C",
4822-
"I2CSLAVE",
4823-
"I2C_ASYNCH",
4824-
"SERIAL_FC",
4825-
"SPI",
4826-
"SPISLAVE",
4827-
"SPI_ASYNCH"
4828-
],
48294826
"supported_form_factors": [
48304827
"ARDUINO_UNO"
48314828
],
48324829
"device_name": "STM32U083RCTx",
48334830
"detect_code": [
48344831
"0888"
48354832
],
4836-
"overrides": {
4837-
"default-adc-vref": 3.3
4838-
},
48394833
"image_url": "https://www.st.com/bin/ecommerce/api/image.PF273876.en.feature-description-include-personalized-no-cpn-large.jpg"
48404834
},
48414835

tools/python/mbed_os_tools/detect/platform_database.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@
198198
u"0885": u"B_L4S5I_IOT01A",
199199
u"0886": u"NUCLEO_U575ZI_Q",
200200
u"0887": u"B_U585I_IOT02A",
201-
u"0888": u"NUCLEO_U083RC"
201+
u"0888": u"NUCLEO_U083RC",
202202
u"0900": u"SAMR21G18A",
203203
u"0905": u"SAMD21G18A",
204204
u"0910": u"SAML21J18A",

0 commit comments

Comments
 (0)