]> mj.ucw.cz Git - home-hw.git/blob - Src/stm32f1xx_hal_msp.c
Experiments with USBD
[home-hw.git] / Src / stm32f1xx_hal_msp.c
1 /**
2   ******************************************************************************
3   * File Name          : stm32f1xx_hal_msp.c
4   * Description        : This file provides code for the MSP Initialization 
5   *                      and de-Initialization codes.
6   ******************************************************************************
7   * This notice applies to any and all portions of this file
8   * that are not between comment pairs USER CODE BEGIN and
9   * USER CODE END. Other portions of this file, whether 
10   * inserted by the user or by software development tools
11   * are owned by their respective copyright owners.
12   *
13   * Copyright (c) 2018 STMicroelectronics International N.V. 
14   * All rights reserved.
15   *
16   * Redistribution and use in source and binary forms, with or without 
17   * modification, are permitted, provided that the following conditions are met:
18   *
19   * 1. Redistribution of source code must retain the above copyright notice, 
20   *    this list of conditions and the following disclaimer.
21   * 2. Redistributions in binary form must reproduce the above copyright notice,
22   *    this list of conditions and the following disclaimer in the documentation
23   *    and/or other materials provided with the distribution.
24   * 3. Neither the name of STMicroelectronics nor the names of other 
25   *    contributors to this software may be used to endorse or promote products 
26   *    derived from this software without specific written permission.
27   * 4. This software, including modifications and/or derivative works of this 
28   *    software, must execute solely and exclusively on microcontroller or
29   *    microprocessor devices manufactured by or for STMicroelectronics.
30   * 5. Redistribution and use of this software other than as permitted under 
31   *    this license is void and will automatically terminate your rights under 
32   *    this license. 
33   *
34   * THIS SOFTWARE IS PROVIDED BY STMICROELECTRONICS AND CONTRIBUTORS "AS IS" 
35   * AND ANY EXPRESS, IMPLIED OR STATUTORY WARRANTIES, INCLUDING, BUT NOT 
36   * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 
37   * PARTICULAR PURPOSE AND NON-INFRINGEMENT OF THIRD PARTY INTELLECTUAL PROPERTY
38   * RIGHTS ARE DISCLAIMED TO THE FULLEST EXTENT PERMITTED BY LAW. IN NO EVENT 
39   * SHALL STMICROELECTRONICS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
40   * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
41   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
42   * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
43   * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
44   * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
45   * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
46   *
47   ******************************************************************************
48   */
49 /* Includes ------------------------------------------------------------------*/
50 #include "stm32f1xx_hal.h"
51
52 extern void _Error_Handler(char *, int);
53 /* USER CODE BEGIN 0 */
54
55 /* USER CODE END 0 */
56 /**
57   * Initializes the Global MSP.
58   */
59 void HAL_MspInit(void)
60 {
61   /* USER CODE BEGIN MspInit 0 */
62
63   /* USER CODE END MspInit 0 */
64
65   __HAL_RCC_AFIO_CLK_ENABLE();
66
67   HAL_NVIC_SetPriorityGrouping(NVIC_PRIORITYGROUP_4);
68
69   /* System interrupt init*/
70   /* MemoryManagement_IRQn interrupt configuration */
71   HAL_NVIC_SetPriority(MemoryManagement_IRQn, 0, 0);
72   /* BusFault_IRQn interrupt configuration */
73   HAL_NVIC_SetPriority(BusFault_IRQn, 0, 0);
74   /* UsageFault_IRQn interrupt configuration */
75   HAL_NVIC_SetPriority(UsageFault_IRQn, 0, 0);
76   /* SVCall_IRQn interrupt configuration */
77   HAL_NVIC_SetPriority(SVCall_IRQn, 0, 0);
78   /* DebugMonitor_IRQn interrupt configuration */
79   HAL_NVIC_SetPriority(DebugMonitor_IRQn, 0, 0);
80   /* PendSV_IRQn interrupt configuration */
81   HAL_NVIC_SetPriority(PendSV_IRQn, 0, 0);
82   /* SysTick_IRQn interrupt configuration */
83   HAL_NVIC_SetPriority(SysTick_IRQn, 0, 0);
84
85     /**NOJTAG: JTAG-DP Disabled and SW-DP Enabled 
86     */
87   __HAL_AFIO_REMAP_SWJ_NOJTAG();
88
89   /* USER CODE BEGIN MspInit 1 */
90
91   /* USER CODE END MspInit 1 */
92 }
93
94 /* USER CODE BEGIN 1 */
95
96 /* USER CODE END 1 */
97
98 /**
99   * @}
100   */
101
102 /**
103   * @}
104   */
105
106 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/