Skip to content

Commit 0e19f00

Browse files
committed
STM32F1 STM32Cube FW V1.6.1 => V1.8.0: target part
- SetSysClock update
1 parent 587c4a1 commit 0e19f00

File tree

7 files changed

+59
-156
lines changed

7 files changed

+59
-156
lines changed

targets/TARGET_STM/TARGET_STM32F1/TARGET_STM32F103x8/TOOLCHAIN_ARM/startup_stm32f103xb.S

Lines changed: 9 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
;******************** (C) COPYRIGHT 2017 STMicroelectronics ********************
22
;* File Name : startup_stm32f103xb.s
33
;* Author : MCD Application Team
4-
;* Version : V4.2.0
5-
;* Date : 31-March-2017
64
;* Description : STM32F103xB Devices vector table for MDK-ARM toolchain.
75
;* This module performs:
86
;* - Set the initial SP
@@ -13,33 +11,18 @@
1311
;* calls main()).
1412
;* After Reset the Cortex-M3 processor is in Thread mode,
1513
;* priority is Privileged, and the Stack is set to Main.
16-
;********************************************************************************
14+
;******************************************************************************
15+
;* @attention
1716
;*
18-
;* <h2><center>&copy; COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
17+
;* Copyright (c) 2017 STMicroelectronics.
18+
;* All rights reserved.
1919
;*
20-
;* Redistribution and use in source and binary forms, with or without modification,
21-
;* are permitted provided that the following conditions are met:
22-
;* 1. Redistributions of source code must retain the above copyright notice,
23-
;* this list of conditions and the following disclaimer.
24-
;* 2. Redistributions in binary form must reproduce the above copyright notice,
25-
;* this list of conditions and the following disclaimer in the documentation
26-
;* and/or other materials provided with the distribution.
27-
;* 3. Neither the name of STMicroelectronics nor the names of its contributors
28-
;* may be used to endorse or promote products derived from this software
29-
;* without specific prior written permission.
20+
;* This software component is licensed by ST under BSD 3-Clause license,
21+
;* the "License"; You may not use this file except in compliance with the
22+
;* License. You may obtain a copy of the License at:
23+
;* opensource.org/licenses/BSD-3-Clause
3024
;*
31-
;* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
32-
;* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
33-
;* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
34-
;* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
35-
;* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36-
;* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
37-
;* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
38-
;* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
39-
;* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
40-
;* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
41-
;
42-
;*******************************************************************************
25+
;******************************************************************************
4326

4427
PRESERVE8
4528
THUMB

targets/TARGET_STM/TARGET_STM32F1/TARGET_STM32F103x8/TOOLCHAIN_GCC_ARM/startup_stm32f103xb.S

Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
*************** (C) COPYRIGHT 2017 STMicroelectronics ************************
33
* @file startup_stm32f103xb.s
44
* @author MCD Application Team
5-
* @version V4.2.0
6-
* @date 31-March-2017
75
* @brief STM32F103xB Devices vector table for Atollic toolchain.
86
* This module performs:
97
* - Set the initial SP
@@ -15,30 +13,15 @@
1513
* After Reset the Cortex-M3 processor is in Thread mode,
1614
* priority is Privileged, and the Stack is set to Main.
1715
******************************************************************************
16+
* @attention
1817
*
19-
* <h2><center>&copy; COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
18+
* <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
19+
* All rights reserved.</center></h2>
2020
*
21-
* Redistribution and use in source and binary forms, with or without modification,
22-
* are permitted provided that the following conditions are met:
23-
* 1. Redistributions of source code must retain the above copyright notice,
24-
* this list of conditions and the following disclaimer.
25-
* 2. Redistributions in binary form must reproduce the above copyright notice,
26-
* this list of conditions and the following disclaimer in the documentation
27-
* and/or other materials provided with the distribution.
28-
* 3. Neither the name of STMicroelectronics nor the names of its contributors
29-
* may be used to endorse or promote products derived from this software
30-
* without specific prior written permission.
31-
*
32-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
33-
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
34-
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
35-
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
36-
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
37-
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
38-
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
39-
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
40-
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
41-
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
21+
* This software component is licensed by ST under BSD 3-Clause license,
22+
* the "License"; You may not use this file except in compliance with the
23+
* License. You may obtain a copy of the License at:
24+
* opensource.org/licenses/BSD-3-Clause
4225
*
4326
******************************************************************************
4427
*/

targets/TARGET_STM/TARGET_STM32F1/TARGET_STM32F103x8/TOOLCHAIN_IAR/startup_stm32f103xb.S

Lines changed: 11 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
;******************** (C) COPYRIGHT 2017 STMicroelectronics ********************
22
;* File Name : startup_stm32f103xb.s
33
;* Author : MCD Application Team
4-
;* Version : V4.2.0
5-
;* Date : 31-March-2017
64
;* Description : STM32F103xB Performance Line Devices vector table for
75
;* EWARM toolchain.
86
;* This module performs:
@@ -13,32 +11,17 @@
1311
;* address.
1412
;* After Reset the Cortex-M3 processor is in Thread mode,
1513
;* priority is Privileged, and the Stack is set to Main.
16-
;********************************************************************************
17-
;*
18-
;* <h2><center>&copy; COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
19-
;*
20-
;* Redistribution and use in source and binary forms, with or without modification,
21-
;* are permitted provided that the following conditions are met:
22-
;* 1. Redistributions of source code must retain the above copyright notice,
23-
;* this list of conditions and the following disclaimer.
24-
;* 2. Redistributions in binary form must reproduce the above copyright notice,
25-
;* this list of conditions and the following disclaimer in the documentation
26-
;* and/or other materials provided with the distribution.
27-
;* 3. Neither the name of STMicroelectronics nor the names of its contributors
28-
;* may be used to endorse or promote products derived from this software
29-
;* without specific prior written permission.
30-
;*
31-
;* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
32-
;* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
33-
;* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
34-
;* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
35-
;* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36-
;* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
37-
;* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
38-
;* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
39-
;* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
40-
;* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
41-
;*
14+
;*******************************************************************************
15+
;* @attention
16+
;*
17+
;* <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
18+
;* All rights reserved.</center></h2>
19+
;*
20+
;* This software component is licensed by ST under BSD 3-Clause license,
21+
;* the "License"; You may not use this file except in compliance with the
22+
;* License. You may obtain a copy of the License at:
23+
;* opensource.org/licenses/BSD-3-Clause
24+
;*
4225
;*******************************************************************************
4326
;
4427
;

targets/TARGET_STM/TARGET_STM32F1/TARGET_STM32F103xB/TOOLCHAIN_ARM/startup_stm32f103xb.S

Lines changed: 9 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
;******************** (C) COPYRIGHT 2017 STMicroelectronics ********************
22
;* File Name : startup_stm32f103xb.s
33
;* Author : MCD Application Team
4-
;* Version : V4.2.0
5-
;* Date : 31-March-2017
64
;* Description : STM32F103xB Devices vector table for MDK-ARM toolchain.
75
;* This module performs:
86
;* - Set the initial SP
@@ -13,33 +11,18 @@
1311
;* calls main()).
1412
;* After Reset the Cortex-M3 processor is in Thread mode,
1513
;* priority is Privileged, and the Stack is set to Main.
16-
;********************************************************************************
14+
;******************************************************************************
15+
;* @attention
1716
;*
18-
;* <h2><center>&copy; COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
17+
;* Copyright (c) 2017 STMicroelectronics.
18+
;* All rights reserved.
1919
;*
20-
;* Redistribution and use in source and binary forms, with or without modification,
21-
;* are permitted provided that the following conditions are met:
22-
;* 1. Redistributions of source code must retain the above copyright notice,
23-
;* this list of conditions and the following disclaimer.
24-
;* 2. Redistributions in binary form must reproduce the above copyright notice,
25-
;* this list of conditions and the following disclaimer in the documentation
26-
;* and/or other materials provided with the distribution.
27-
;* 3. Neither the name of STMicroelectronics nor the names of its contributors
28-
;* may be used to endorse or promote products derived from this software
29-
;* without specific prior written permission.
20+
;* This software component is licensed by ST under BSD 3-Clause license,
21+
;* the "License"; You may not use this file except in compliance with the
22+
;* License. You may obtain a copy of the License at:
23+
;* opensource.org/licenses/BSD-3-Clause
3024
;*
31-
;* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
32-
;* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
33-
;* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
34-
;* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
35-
;* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36-
;* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
37-
;* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
38-
;* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
39-
;* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
40-
;* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
41-
;
42-
;*******************************************************************************
25+
;******************************************************************************
4326

4427
PRESERVE8
4528
THUMB

targets/TARGET_STM/TARGET_STM32F1/TARGET_STM32F103xB/TOOLCHAIN_GCC_ARM/startup_stm32f103xb.S

Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
*************** (C) COPYRIGHT 2017 STMicroelectronics ************************
33
* @file startup_stm32f103xb.s
44
* @author MCD Application Team
5-
* @version V4.2.0
6-
* @date 31-March-2017
75
* @brief STM32F103xB Devices vector table for Atollic toolchain.
86
* This module performs:
97
* - Set the initial SP
@@ -15,30 +13,15 @@
1513
* After Reset the Cortex-M3 processor is in Thread mode,
1614
* priority is Privileged, and the Stack is set to Main.
1715
******************************************************************************
16+
* @attention
1817
*
19-
* <h2><center>&copy; COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
18+
* <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
19+
* All rights reserved.</center></h2>
2020
*
21-
* Redistribution and use in source and binary forms, with or without modification,
22-
* are permitted provided that the following conditions are met:
23-
* 1. Redistributions of source code must retain the above copyright notice,
24-
* this list of conditions and the following disclaimer.
25-
* 2. Redistributions in binary form must reproduce the above copyright notice,
26-
* this list of conditions and the following disclaimer in the documentation
27-
* and/or other materials provided with the distribution.
28-
* 3. Neither the name of STMicroelectronics nor the names of its contributors
29-
* may be used to endorse or promote products derived from this software
30-
* without specific prior written permission.
31-
*
32-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
33-
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
34-
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
35-
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
36-
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
37-
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
38-
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
39-
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
40-
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
41-
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
21+
* This software component is licensed by ST under BSD 3-Clause license,
22+
* the "License"; You may not use this file except in compliance with the
23+
* License. You may obtain a copy of the License at:
24+
* opensource.org/licenses/BSD-3-Clause
4225
*
4326
******************************************************************************
4427
*/

targets/TARGET_STM/TARGET_STM32F1/TARGET_STM32F103xB/TOOLCHAIN_IAR/startup_stm32f103xb.S

Lines changed: 11 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
;******************** (C) COPYRIGHT 2017 STMicroelectronics ********************
22
;* File Name : startup_stm32f103xb.s
33
;* Author : MCD Application Team
4-
;* Version : V4.2.0
5-
;* Date : 31-March-2017
64
;* Description : STM32F103xB Performance Line Devices vector table for
75
;* EWARM toolchain.
86
;* This module performs:
@@ -13,32 +11,17 @@
1311
;* address.
1412
;* After Reset the Cortex-M3 processor is in Thread mode,
1513
;* priority is Privileged, and the Stack is set to Main.
16-
;********************************************************************************
17-
;*
18-
;* <h2><center>&copy; COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
19-
;*
20-
;* Redistribution and use in source and binary forms, with or without modification,
21-
;* are permitted provided that the following conditions are met:
22-
;* 1. Redistributions of source code must retain the above copyright notice,
23-
;* this list of conditions and the following disclaimer.
24-
;* 2. Redistributions in binary form must reproduce the above copyright notice,
25-
;* this list of conditions and the following disclaimer in the documentation
26-
;* and/or other materials provided with the distribution.
27-
;* 3. Neither the name of STMicroelectronics nor the names of its contributors
28-
;* may be used to endorse or promote products derived from this software
29-
;* without specific prior written permission.
30-
;*
31-
;* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
32-
;* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
33-
;* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
34-
;* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
35-
;* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36-
;* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
37-
;* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
38-
;* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
39-
;* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
40-
;* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
41-
;*
14+
;*******************************************************************************
15+
;* @attention
16+
;*
17+
;* <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
18+
;* All rights reserved.</center></h2>
19+
;*
20+
;* This software component is licensed by ST under BSD 3-Clause license,
21+
;* the "License"; You may not use this file except in compliance with the
22+
;* License. You may obtain a copy of the License at:
23+
;* opensource.org/licenses/BSD-3-Clause
24+
;*
4225
;*******************************************************************************
4326
;
4427
;

targets/TARGET_STM/TARGET_STM32F1/TARGET_STM32F103xB/system_clock.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,11 @@ uint8_t SetSysClock_PLL_HSE(uint8_t bypass)
9696
RCC_PeriphCLKInitTypeDef RCC_PeriphCLKInit;
9797
#endif /* DEVICE_USBDEVICE */
9898

99+
// Select HSI as system clock source to allow modification of the PLL configuration
100+
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_SYSCLK;
101+
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_HSI;
102+
HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_0);
103+
99104
/* Enable HSE oscillator and activate PLL with HSE as source */
100105
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;
101106
if (bypass == 0) {

0 commit comments

Comments
 (0)