Skip to content

Commit af4841d

Browse files
committed
STM32 LPTICKER : set default LPTICKER_DELAY_TICKS to 1
For both implementation, RTC and LPTIM, there is some delay in the set_interrupt function due to HW constraints. Value has been set to 4 for STM32L0, because SystemClock is slower than other families.
1 parent 9bc2e5a commit af4841d

File tree

1 file changed

+15
-132
lines changed

1 file changed

+15
-132
lines changed

targets/targets.json

Lines changed: 15 additions & 132 deletions
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,12 @@
753753
},
754754
"stdio_uart_rx": {
755755
"help": "default RX STDIO pins is defined in PinNames.h file, but it can be overridden"
756-
}
756+
},
757+
"lpticker_delay_ticks": {
758+
"help": "https://os.mbed.com/docs/latest/porting/low-power-ticker.html",
759+
"value": 1,
760+
"macro_name": "LPTICKER_DELAY_TICKS"
761+
}
757762
},
758763
"device_has": ["USTICKER", "LPTICKER", "RTC", "ANALOGIN", "I2C", "I2CSLAVE", "I2C_ASYNCH", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "SERIAL", "SLEEP", "SPI", "SPISLAVE", "SPI_ASYNCH", "STDIO_MESSAGES"]
759764
},
@@ -882,11 +887,6 @@
882887
"help": "Mask value : USE_PLL_HSE_EXTC | USE_PLL_HSE_XTAL (need HW patch) | USE_PLL_HSI",
883888
"value": "USE_PLL_HSE_EXTC|USE_PLL_HSI",
884889
"macro_name": "CLOCK_SOURCE"
885-
},
886-
"lpticker_delay_ticks": {
887-
"help": "For targets with low frequency system clock, set lpticker_delay_ticks value to 1",
888-
"value": 1,
889-
"macro_name": "LPTICKER_DELAY_TICKS"
890890
}
891891
},
892892
"detect_code": ["0755"],
@@ -905,11 +905,6 @@
905905
"help": "Mask value : USE_PLL_HSE_EXTC | USE_PLL_HSE_XTAL (need HW patch) | USE_PLL_HSI",
906906
"value": "USE_PLL_HSE_EXTC|USE_PLL_HSI",
907907
"macro_name": "CLOCK_SOURCE"
908-
},
909-
"lpticker_delay_ticks": {
910-
"help": "For targets with low frequency system clock, set lpticker_delay_ticks value to 1",
911-
"value": 1,
912-
"macro_name": "LPTICKER_DELAY_TICKS"
913908
}
914909
},
915910
"detect_code": ["0730"],
@@ -928,11 +923,6 @@
928923
"help": "Mask value : USE_PLL_HSE_EXTC | USE_PLL_HSE_XTAL (need HW patch) | USE_PLL_HSI",
929924
"value": "USE_PLL_HSE_EXTC|USE_PLL_HSI",
930925
"macro_name": "CLOCK_SOURCE"
931-
},
932-
"lpticker_delay_ticks": {
933-
"help": "For targets with low frequency system clock, set lpticker_delay_ticks value to 1",
934-
"value": 1,
935-
"macro_name": "LPTICKER_DELAY_TICKS"
936926
}
937927
},
938928
"detect_code": ["0750"],
@@ -1131,11 +1121,6 @@
11311121
"lpticker_lptim": {
11321122
"help": "This target supports LPTIM. Set value 1 to use LPTIM for LPTICKER, or 0 to use RTC wakeup timer",
11331123
"value": 1
1134-
},
1135-
"lpticker_delay_ticks": {
1136-
"help": "In case of lpticker_lptim=1, set lpticker_delay_ticks=3",
1137-
"value": 3,
1138-
"macro_name": "LPTICKER_DELAY_TICKS"
11391124
}
11401125
},
11411126
"detect_code": ["0744"],
@@ -1261,11 +1246,6 @@
12611246
"lpticker_lptim": {
12621247
"help": "This target supports LPTIM. Set value 1 to use LPTIM for LPTICKER, or 0 to use RTC wakeup timer",
12631248
"value": 1
1264-
},
1265-
"lpticker_delay_ticks": {
1266-
"help": "In case of lpticker_lptim=1, set lpticker_delay_ticks=3",
1267-
"value": 3,
1268-
"macro_name": "LPTICKER_DELAY_TICKS"
12691249
}
12701250
},
12711251
"detect_code": ["0743"],
@@ -1288,11 +1268,6 @@
12881268
"lpticker_lptim": {
12891269
"help": "This target supports LPTIM. Set value 1 to use LPTIM for LPTICKER, or 0 to use RTC wakeup timer",
12901270
"value": 1
1291-
},
1292-
"lpticker_delay_ticks": {
1293-
"help": "In case of lpticker_lptim=1, set lpticker_delay_ticks=3",
1294-
"value": 3,
1295-
"macro_name": "LPTICKER_DELAY_TICKS"
12961271
}
12971272
},
12981273
"detect_code": ["0743"],
@@ -1443,11 +1418,6 @@
14431418
"lpticker_lptim": {
14441419
"help": "This target supports LPTIM. Set value 1 to use LPTIM for LPTICKER, or 0 to use RTC wakeup timer",
14451420
"value": 1
1446-
},
1447-
"lpticker_delay_ticks": {
1448-
"help": "In case of lpticker_lptim=1, set lpticker_delay_ticks=3",
1449-
"value": 3,
1450-
"macro_name": "LPTICKER_DELAY_TICKS"
14511421
}
14521422
},
14531423
"macros_add": ["USBHOST_OTHER"],
@@ -1479,11 +1449,6 @@
14791449
"lpticker_lptim": {
14801450
"help": "This target supports LPTIM. Set value 1 to use LPTIM for LPTICKER, or 0 to use RTC wakeup timer",
14811451
"value": 1
1482-
},
1483-
"lpticker_delay_ticks": {
1484-
"help": "In case of lpticker_lptim=1, set lpticker_delay_ticks=3",
1485-
"value": 3,
1486-
"macro_name": "LPTICKER_DELAY_TICKS"
14871452
}
14881453
},
14891454
"macros_add": ["TRANSACTION_QUEUE_SIZE_SPI=2", "USBHOST_OTHER", "MBEDTLS_CONFIG_HW_SUPPORT"],
@@ -1518,11 +1483,6 @@
15181483
"lpticker_lptim": {
15191484
"help": "This target supports LPTIM. Set value 1 to use LPTIM for LPTICKER, or 0 to use RTC wakeup timer",
15201485
"value": 1
1521-
},
1522-
"lpticker_delay_ticks": {
1523-
"help": "In case of lpticker_lptim=1, set lpticker_delay_ticks=3",
1524-
"value": 3,
1525-
"macro_name": "LPTICKER_DELAY_TICKS"
15261486
}
15271487
},
15281488
"supported_form_factors": ["ARDUINO"],
@@ -1552,13 +1512,9 @@
15521512
"lpticker_lptim": {
15531513
"help": "This target supports LPTIM. Set value 1 to use LPTIM for LPTICKER, or 0 to use RTC wakeup timer",
15541514
"value": 1
1555-
},
1556-
"lpticker_delay_ticks": {
1557-
"help": "In case of lpticker_lptim=1, set lpticker_delay_ticks=3",
1558-
"value": 3,
1559-
"macro_name": "LPTICKER_DELAY_TICKS"
15601515
}
15611516
},
1517+
"overrides": {"lpticker_delay_ticks": 4},
15621518
"detect_code": ["0780"],
15631519
"device_has_add": ["CRC", "SERIAL_FC", "FLASH"],
15641520
"default_lib": "small",
@@ -1580,13 +1536,9 @@
15801536
"lpticker_lptim": {
15811537
"help": "This target supports LPTIM. Set value 1 to use LPTIM for LPTICKER, or 0 to use RTC wakeup timer",
15821538
"value": 1
1583-
},
1584-
"lpticker_delay_ticks": {
1585-
"help": "In case of lpticker_lptim=1, set lpticker_delay_ticks=3",
1586-
"value": 3,
1587-
"macro_name": "LPTICKER_DELAY_TICKS"
15881539
}
15891540
},
1541+
"overrides": {"lpticker_delay_ticks": 4},
15901542
"detect_code": ["0790"],
15911543
"device_has_add": ["CRC", "SERIAL_FC", "FLASH"],
15921544
"default_lib": "small",
@@ -1607,13 +1559,9 @@
16071559
"lpticker_lptim": {
16081560
"help": "This target supports LPTIM. Set value 1 to use LPTIM for LPTICKER, or 0 to use RTC wakeup timer",
16091561
"value": 1
1610-
},
1611-
"lpticker_delay_ticks": {
1612-
"help": "In case of lpticker_lptim=1, set lpticker_delay_ticks=3",
1613-
"value": 3,
1614-
"macro_name": "LPTICKER_DELAY_TICKS"
16151562
}
16161563
},
1564+
"overrides": {"lpticker_delay_ticks": 4},
16171565
"detect_code": ["0715"],
16181566
"device_has_add": ["ANALOGOUT", "CRC", "SERIAL_FC", "SERIAL_ASYNCH", "FLASH"],
16191567
"default_lib": "small",
@@ -1634,13 +1582,9 @@
16341582
"lpticker_lptim": {
16351583
"help": "This target supports LPTIM. Set value 1 to use LPTIM for LPTICKER, or 0 to use RTC wakeup timer",
16361584
"value": 1
1637-
},
1638-
"lpticker_delay_ticks": {
1639-
"help": "In case of lpticker_lptim=1, set lpticker_delay_ticks=3",
1640-
"value": 3,
1641-
"macro_name": "LPTICKER_DELAY_TICKS"
16421585
}
16431586
},
1587+
"overrides": {"lpticker_delay_ticks": 4},
16441588
"detect_code": ["0760"],
16451589
"device_has_add": ["ANALOGOUT", "CRC", "SERIAL_FC", "SERIAL_ASYNCH", "TRNG", "FLASH"],
16461590
"release_versions": ["2", "5"],
@@ -1656,11 +1600,6 @@
16561600
"help": "Mask value : USE_PLL_HSE_EXTC | USE_PLL_HSE_XTAL (need HW patch) | USE_PLL_HSI",
16571601
"value": "USE_PLL_HSE_EXTC|USE_PLL_HSI",
16581602
"macro_name": "CLOCK_SOURCE"
1659-
},
1660-
"lpticker_delay_ticks": {
1661-
"help": "For targets with low frequency system clock, set lpticker_delay_ticks value to 1",
1662-
"value": 1,
1663-
"macro_name": "LPTICKER_DELAY_TICKS"
16641603
}
16651604
},
16661605
"detect_code": ["0710"],
@@ -1682,11 +1621,6 @@
16821621
"lpticker_lptim": {
16831622
"help": "This target supports LPTIM. Set value 1 to use LPTIM for LPTICKER, or 0 to use RTC wakeup timer",
16841623
"value": 1
1685-
},
1686-
"lpticker_delay_ticks": {
1687-
"help": "In case of lpticker_lptim=1, set lpticker_delay_ticks=3",
1688-
"value": 3,
1689-
"macro_name": "LPTICKER_DELAY_TICKS"
16901624
}
16911625
},
16921626
"detect_code": ["0770"],
@@ -1709,11 +1643,6 @@
17091643
"lpticker_lptim": {
17101644
"help": "This target supports LPTIM. Set value 1 to use LPTIM for LPTICKER, or 0 to use RTC wakeup timer",
17111645
"value": 1
1712-
},
1713-
"lpticker_delay_ticks": {
1714-
"help": "In case of lpticker_lptim=1, set lpticker_delay_ticks=3",
1715-
"value": 3,
1716-
"macro_name": "LPTICKER_DELAY_TICKS"
17171646
}
17181647
},
17191648
"detect_code": ["0779"],
@@ -1756,11 +1685,6 @@
17561685
"lpticker_lptim": {
17571686
"help": "This target supports LPTIM. Set value 1 to use LPTIM for LPTICKER, or 0 to use RTC wakeup timer",
17581687
"value": 1
1759-
},
1760-
"lpticker_delay_ticks": {
1761-
"help": "In case of lpticker_lptim=1, set lpticker_delay_ticks=3",
1762-
"value": 3,
1763-
"macro_name": "LPTICKER_DELAY_TICKS"
17641688
}
17651689
},
17661690
"detect_code": ["0765"],
@@ -1802,11 +1726,6 @@
18021726
"lpticker_lptim": {
18031727
"help": "This target supports LPTIM. Set value 1 to use LPTIM for LPTICKER, or 0 to use RTC wakeup timer",
18041728
"value": 1
1805-
},
1806-
"lpticker_delay_ticks": {
1807-
"help": "In case of lpticker_lptim=1, set lpticker_delay_ticks=3",
1808-
"value": 3,
1809-
"macro_name": "LPTICKER_DELAY_TICKS"
18101729
}
18111730
},
18121731
"detect_code": ["0827"],
@@ -2014,14 +1933,12 @@
20141933
"help": "This target supports LPTIM. Set value 1 to use LPTIM for LPTICKER, or 0 to use RTC wakeup timer",
20151934
"value": 1
20161935

2017-
},
2018-
"lpticker_delay_ticks": {
2019-
"help": "In case of lpticker_lptim=1, set lpticker_delay_ticks=3",
2020-
"value": 3,
2021-
"macro_name": "LPTICKER_DELAY_TICKS"
20221936
}
20231937
},
2024-
"overrides": {"lse_available": 0},
1938+
"overrides": {
1939+
"lse_available": 0,
1940+
"lpticker_delay_ticks": 4
1941+
},
20251942
"device_has_add": ["ANALOGOUT", "CRC", "SERIAL_FC", "FLASH"],
20261943
"default_lib": "small",
20271944
"release_versions": ["2"],
@@ -2041,13 +1958,9 @@
20411958
"lpticker_lptim": {
20421959
"help": "This target supports LPTIM. Set value 1 to use LPTIM for LPTICKER, or 0 to use RTC wakeup timer",
20431960
"value": 1
2044-
},
2045-
"lpticker_delay_ticks": {
2046-
"help": "In case of lpticker_lptim=1, set lpticker_delay_ticks=3",
2047-
"value": 3,
2048-
"macro_name": "LPTICKER_DELAY_TICKS"
20491961
}
20501962
},
1963+
"overrides": {"lpticker_delay_ticks": 4},
20511964
"detect_code": ["0833"],
20521965
"device_has_add": ["ANALOGOUT", "SERIAL_FC", "SERIAL_ASYNCH", "TRNG", "FLASH"],
20531966
"release_versions": ["2", "5"],
@@ -2081,11 +1994,6 @@
20811994
"lpticker_lptim": {
20821995
"help": "This target supports LPTIM. Set value 1 to use LPTIM for LPTICKER, or 0 to use RTC wakeup timer",
20831996
"value": 1
2084-
},
2085-
"lpticker_delay_ticks": {
2086-
"help": "In case of lpticker_lptim=1, set lpticker_delay_ticks=3",
2087-
"value": 3,
2088-
"macro_name": "LPTICKER_DELAY_TICKS"
20891997
}
20901998
},
20911999
"detect_code": ["0815"],
@@ -2115,11 +2023,6 @@
21152023
"lpticker_lptim": {
21162024
"help": "This target supports LPTIM. Set value 1 to use LPTIM for LPTICKER, or 0 to use RTC wakeup timer",
21172025
"value": 1
2118-
},
2119-
"lpticker_delay_ticks": {
2120-
"help": "In case of lpticker_lptim=1, set lpticker_delay_ticks=3",
2121-
"value": 3,
2122-
"macro_name": "LPTICKER_DELAY_TICKS"
21232026
}
21242027
},
21252028
"detect_code": ["0817"],
@@ -2144,11 +2047,6 @@
21442047
"lpticker_lptim": {
21452048
"help": "This target supports LPTIM. Set value 1 to use LPTIM for LPTICKER, or 0 to use RTC wakeup timer",
21462049
"value": 1
2147-
},
2148-
"lpticker_delay_ticks": {
2149-
"help": "In case of lpticker_lptim=1, set lpticker_delay_ticks=3",
2150-
"value": 3,
2151-
"macro_name": "LPTICKER_DELAY_TICKS"
21522050
}
21532051
},
21542052
"supported_form_factors": ["ARDUINO"],
@@ -2172,11 +2070,6 @@
21722070
"lpticker_lptim": {
21732071
"help": "This target supports LPTIM. Set value 1 to use LPTIM for LPTICKER, or 0 to use RTC wakeup timer",
21742072
"value": 1
2175-
},
2176-
"lpticker_delay_ticks": {
2177-
"help": "In case of lpticker_lptim=1, set lpticker_delay_ticks=3",
2178-
"value": 3,
2179-
"macro_name": "LPTICKER_DELAY_TICKS"
21802073
}
21812074
},
21822075
"detect_code": ["0820"],
@@ -4282,11 +4175,6 @@
42824175
"lpticker_lptim": {
42834176
"help": "This target supports LPTIM. Set value 1 to use LPTIM for LPTICKER, or 0 to use RTC wakeup timer",
42844177
"value": 1
4285-
},
4286-
"lpticker_delay_ticks": {
4287-
"help": "In case of lpticker_lptim=1, set lpticker_delay_ticks=3",
4288-
"value": 3,
4289-
"macro_name": "LPTICKER_DELAY_TICKS"
42904178
}
42914179
},
42924180
"detect_code": ["0822"],
@@ -4308,11 +4196,6 @@
43084196
"lpticker_lptim": {
43094197
"help": "This target supports LPTIM. Set value 1 to use LPTIM for LPTICKER, or 0 to use RTC wakeup timer",
43104198
"value": 1
4311-
},
4312-
"lpticker_delay_ticks": {
4313-
"help": "In case of lpticker_lptim=1, set lpticker_delay_ticks=3",
4314-
"value": 3,
4315-
"macro_name": "LPTICKER_DELAY_TICKS"
43164199
}
43174200
},
43184201
"detect_code": ["0823"],

0 commit comments

Comments
 (0)