![](/media/cache/profiles/827ccb0eea8a706c4c34a16891f84e7b.jpg.50x50_q85.jpg)
Bootload from SD card to sector 0, and jump to sector 24 where new firmware resides
Fork of Panel-Controller-Bootloader by
stm32f10x_it.c@2:0fa89ba8f6fe, 2015-04-22 (annotated)
- Committer:
- bonchenko
- Date:
- Wed Apr 22 10:18:55 2015 +0000
- Revision:
- 2:0fa89ba8f6fe
- Parent:
- 0:c3a652eff606
Bootloader from SD card works perfectly. Compiled with offset in EmBlocks, ADE cannot print readings - but its happened without bootloader too. The problem is Emblocks compiler settings
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
bonchenko | 0:c3a652eff606 | 1 | /** |
bonchenko | 0:c3a652eff606 | 2 | ****************************************************************************** |
bonchenko | 0:c3a652eff606 | 3 | * @file Project/STM32F10x_StdPeriph_Template/stm32f10x_it.c |
bonchenko | 0:c3a652eff606 | 4 | * @author MCD Application Team |
bonchenko | 0:c3a652eff606 | 5 | * @version V3.5.0 |
bonchenko | 0:c3a652eff606 | 6 | * @date 08-April-2011 |
bonchenko | 0:c3a652eff606 | 7 | * @brief Main Interrupt Service Routines. |
bonchenko | 0:c3a652eff606 | 8 | * This file provides template for all exceptions handler and |
bonchenko | 0:c3a652eff606 | 9 | * peripherals interrupt service routine. |
bonchenko | 0:c3a652eff606 | 10 | ****************************************************************************** |
bonchenko | 0:c3a652eff606 | 11 | * @attention |
bonchenko | 0:c3a652eff606 | 12 | * |
bonchenko | 0:c3a652eff606 | 13 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS |
bonchenko | 0:c3a652eff606 | 14 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE |
bonchenko | 0:c3a652eff606 | 15 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY |
bonchenko | 0:c3a652eff606 | 16 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING |
bonchenko | 0:c3a652eff606 | 17 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE |
bonchenko | 0:c3a652eff606 | 18 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. |
bonchenko | 0:c3a652eff606 | 19 | * |
bonchenko | 0:c3a652eff606 | 20 | * <h2><center>© COPYRIGHT 2011 STMicroelectronics</center></h2> |
bonchenko | 0:c3a652eff606 | 21 | ****************************************************************************** |
bonchenko | 0:c3a652eff606 | 22 | */ |
bonchenko | 0:c3a652eff606 | 23 | |
bonchenko | 0:c3a652eff606 | 24 | /* Includes ------------------------------------------------------------------*/ |
bonchenko | 0:c3a652eff606 | 25 | #include "stm32f10x_it.h" |
bonchenko | 0:c3a652eff606 | 26 | #include "main.h" |
bonchenko | 0:c3a652eff606 | 27 | #include "diskio.h" |
bonchenko | 0:c3a652eff606 | 28 | |
bonchenko | 0:c3a652eff606 | 29 | /** @addtogroup STM32F10x_StdPeriph_Template |
bonchenko | 0:c3a652eff606 | 30 | * @{ |
bonchenko | 0:c3a652eff606 | 31 | */ |
bonchenko | 0:c3a652eff606 | 32 | |
bonchenko | 0:c3a652eff606 | 33 | /* Private typedef -----------------------------------------------------------*/ |
bonchenko | 0:c3a652eff606 | 34 | /* Private define ------------------------------------------------------------*/ |
bonchenko | 0:c3a652eff606 | 35 | /* Private macro -------------------------------------------------------------*/ |
bonchenko | 0:c3a652eff606 | 36 | /* Private variables ---------------------------------------------------------*/ |
bonchenko | 0:c3a652eff606 | 37 | /* Private function prototypes -----------------------------------------------*/ |
bonchenko | 0:c3a652eff606 | 38 | /* Private functions ---------------------------------------------------------*/ |
bonchenko | 0:c3a652eff606 | 39 | |
bonchenko | 0:c3a652eff606 | 40 | /******************************************************************************/ |
bonchenko | 0:c3a652eff606 | 41 | /* Cortex-M3 Processor Exceptions Handlers */ |
bonchenko | 0:c3a652eff606 | 42 | /******************************************************************************/ |
bonchenko | 0:c3a652eff606 | 43 | |
bonchenko | 0:c3a652eff606 | 44 | /** |
bonchenko | 0:c3a652eff606 | 45 | * @brief This function handles NMI exception. |
bonchenko | 0:c3a652eff606 | 46 | * @param None |
bonchenko | 0:c3a652eff606 | 47 | * @retval None |
bonchenko | 0:c3a652eff606 | 48 | */ |
bonchenko | 0:c3a652eff606 | 49 | void NMI_Handler(void) |
bonchenko | 0:c3a652eff606 | 50 | { |
bonchenko | 0:c3a652eff606 | 51 | } |
bonchenko | 0:c3a652eff606 | 52 | |
bonchenko | 0:c3a652eff606 | 53 | /** |
bonchenko | 0:c3a652eff606 | 54 | * @brief This function handles Hard Fault exception. |
bonchenko | 0:c3a652eff606 | 55 | * @param None |
bonchenko | 0:c3a652eff606 | 56 | * @retval None |
bonchenko | 0:c3a652eff606 | 57 | */ |
bonchenko | 0:c3a652eff606 | 58 | void HardFault_Handler(void) |
bonchenko | 0:c3a652eff606 | 59 | { |
bonchenko | 0:c3a652eff606 | 60 | /* Go to infinite loop when Hard Fault exception occurs */ |
bonchenko | 0:c3a652eff606 | 61 | while (1) |
bonchenko | 0:c3a652eff606 | 62 | { |
bonchenko | 0:c3a652eff606 | 63 | } |
bonchenko | 0:c3a652eff606 | 64 | } |
bonchenko | 0:c3a652eff606 | 65 | |
bonchenko | 0:c3a652eff606 | 66 | /** |
bonchenko | 0:c3a652eff606 | 67 | * @brief This function handles Memory Manage exception. |
bonchenko | 0:c3a652eff606 | 68 | * @param None |
bonchenko | 0:c3a652eff606 | 69 | * @retval None |
bonchenko | 0:c3a652eff606 | 70 | */ |
bonchenko | 0:c3a652eff606 | 71 | void MemManage_Handler(void) |
bonchenko | 0:c3a652eff606 | 72 | { |
bonchenko | 0:c3a652eff606 | 73 | /* Go to infinite loop when Memory Manage exception occurs */ |
bonchenko | 0:c3a652eff606 | 74 | while (1) |
bonchenko | 0:c3a652eff606 | 75 | { |
bonchenko | 0:c3a652eff606 | 76 | } |
bonchenko | 0:c3a652eff606 | 77 | } |
bonchenko | 0:c3a652eff606 | 78 | |
bonchenko | 0:c3a652eff606 | 79 | /** |
bonchenko | 0:c3a652eff606 | 80 | * @brief This function handles Bus Fault exception. |
bonchenko | 0:c3a652eff606 | 81 | * @param None |
bonchenko | 0:c3a652eff606 | 82 | * @retval None |
bonchenko | 0:c3a652eff606 | 83 | */ |
bonchenko | 0:c3a652eff606 | 84 | void BusFault_Handler(void) |
bonchenko | 0:c3a652eff606 | 85 | { |
bonchenko | 0:c3a652eff606 | 86 | /* Go to infinite loop when Bus Fault exception occurs */ |
bonchenko | 0:c3a652eff606 | 87 | while (1) |
bonchenko | 0:c3a652eff606 | 88 | { |
bonchenko | 0:c3a652eff606 | 89 | } |
bonchenko | 0:c3a652eff606 | 90 | } |
bonchenko | 0:c3a652eff606 | 91 | |
bonchenko | 0:c3a652eff606 | 92 | /** |
bonchenko | 0:c3a652eff606 | 93 | * @brief This function handles Usage Fault exception. |
bonchenko | 0:c3a652eff606 | 94 | * @param None |
bonchenko | 0:c3a652eff606 | 95 | * @retval None |
bonchenko | 0:c3a652eff606 | 96 | */ |
bonchenko | 0:c3a652eff606 | 97 | void UsageFault_Handler(void) |
bonchenko | 0:c3a652eff606 | 98 | { |
bonchenko | 0:c3a652eff606 | 99 | /* Go to infinite loop when Usage Fault exception occurs */ |
bonchenko | 0:c3a652eff606 | 100 | while (1) |
bonchenko | 0:c3a652eff606 | 101 | { |
bonchenko | 0:c3a652eff606 | 102 | } |
bonchenko | 0:c3a652eff606 | 103 | } |
bonchenko | 0:c3a652eff606 | 104 | |
bonchenko | 0:c3a652eff606 | 105 | /** |
bonchenko | 0:c3a652eff606 | 106 | * @brief This function handles SVCall exception. |
bonchenko | 0:c3a652eff606 | 107 | * @param None |
bonchenko | 0:c3a652eff606 | 108 | * @retval None |
bonchenko | 0:c3a652eff606 | 109 | */ |
bonchenko | 0:c3a652eff606 | 110 | void SVC_Handler(void) |
bonchenko | 0:c3a652eff606 | 111 | { |
bonchenko | 0:c3a652eff606 | 112 | } |
bonchenko | 0:c3a652eff606 | 113 | |
bonchenko | 0:c3a652eff606 | 114 | /** |
bonchenko | 0:c3a652eff606 | 115 | * @brief This function handles Debug Monitor exception. |
bonchenko | 0:c3a652eff606 | 116 | * @param None |
bonchenko | 0:c3a652eff606 | 117 | * @retval None |
bonchenko | 0:c3a652eff606 | 118 | */ |
bonchenko | 0:c3a652eff606 | 119 | void DebugMon_Handler(void) |
bonchenko | 0:c3a652eff606 | 120 | { |
bonchenko | 0:c3a652eff606 | 121 | } |
bonchenko | 0:c3a652eff606 | 122 | |
bonchenko | 0:c3a652eff606 | 123 | /** |
bonchenko | 0:c3a652eff606 | 124 | * @brief This function handles PendSVC exception. |
bonchenko | 0:c3a652eff606 | 125 | * @param None |
bonchenko | 0:c3a652eff606 | 126 | * @retval None |
bonchenko | 0:c3a652eff606 | 127 | */ |
bonchenko | 0:c3a652eff606 | 128 | void PendSV_Handler(void) |
bonchenko | 0:c3a652eff606 | 129 | { |
bonchenko | 0:c3a652eff606 | 130 | } |
bonchenko | 0:c3a652eff606 | 131 | |
bonchenko | 0:c3a652eff606 | 132 | void TIM3_IRQHandler(void) |
bonchenko | 0:c3a652eff606 | 133 | { |
bonchenko | 0:c3a652eff606 | 134 | if(TIM_GetITStatus(TIM3, TIM_IT_Update) != RESET) |
bonchenko | 0:c3a652eff606 | 135 | { |
bonchenko | 0:c3a652eff606 | 136 | TIM_ClearITPendingBit(TIM3, TIM_IT_Update); |
bonchenko | 0:c3a652eff606 | 137 | disk_timerproc(); |
bonchenko | 0:c3a652eff606 | 138 | } |
bonchenko | 0:c3a652eff606 | 139 | } |
bonchenko | 0:c3a652eff606 | 140 | |
bonchenko | 0:c3a652eff606 | 141 | /** |
bonchenko | 0:c3a652eff606 | 142 | * @brief This function handles SysTick Handler. |
bonchenko | 0:c3a652eff606 | 143 | * @param None |
bonchenko | 0:c3a652eff606 | 144 | * @retval None |
bonchenko | 0:c3a652eff606 | 145 | */ |
bonchenko | 0:c3a652eff606 | 146 | void SysTick_Handler(void) |
bonchenko | 0:c3a652eff606 | 147 | { |
bonchenko | 0:c3a652eff606 | 148 | } |
bonchenko | 0:c3a652eff606 | 149 | |
bonchenko | 0:c3a652eff606 | 150 | /******************************************************************************/ |
bonchenko | 0:c3a652eff606 | 151 | /* STM32F10x Peripherals Interrupt Handlers */ |
bonchenko | 0:c3a652eff606 | 152 | /* Add here the Interrupt Handler for the used peripheral(s) (PPP), for the */ |
bonchenko | 0:c3a652eff606 | 153 | /* available peripheral interrupt handler's name please refer to the startup */ |
bonchenko | 0:c3a652eff606 | 154 | /* file (startup_stm32f10x_xx.s). */ |
bonchenko | 0:c3a652eff606 | 155 | /******************************************************************************/ |
bonchenko | 0:c3a652eff606 | 156 | |
bonchenko | 0:c3a652eff606 | 157 | /** |
bonchenko | 0:c3a652eff606 | 158 | * @brief This function handles PPP interrupt request. |
bonchenko | 0:c3a652eff606 | 159 | * @param None |
bonchenko | 0:c3a652eff606 | 160 | * @retval None |
bonchenko | 0:c3a652eff606 | 161 | */ |
bonchenko | 0:c3a652eff606 | 162 | /*void PPP_IRQHandler(void) |
bonchenko | 0:c3a652eff606 | 163 | { |
bonchenko | 0:c3a652eff606 | 164 | }*/ |
bonchenko | 0:c3a652eff606 | 165 | |
bonchenko | 0:c3a652eff606 | 166 | /** |
bonchenko | 0:c3a652eff606 | 167 | * @} |
bonchenko | 0:c3a652eff606 | 168 | */ |
bonchenko | 0:c3a652eff606 | 169 | |
bonchenko | 0:c3a652eff606 | 170 | |
bonchenko | 0:c3a652eff606 | 171 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/ |