AnsweredAssumed Answered

F3 Interrupt Leaves Processor in Handler Mode

Question asked by Troyer.Tyler on Oct 19, 2016
Latest reply on Oct 20, 2016 by Troyer.Tyler
Hi all,

I have a strange problem I've not encountered before. I have a lot of firmware written for the F3 at this point, so I'm confident that my configuration is ok, and without obvious problems.


My setup is on Keil 5.16a on Win7, and I'm using the V1.2.3 of the Std. Periph Lib on the STM32F303K8T6 target, which is on my Nucleo-32 board.


I'm trying to setup the ADC to make 2 regular channel conversions, which get transferred via the DMA1_Channel1. So far, so good. I can this is true since checking the flag along the way lets the peripherals run, and I can see the values of each channel change as expected. Here is what I run in my main loop to verify this:

01.while(TIM_GetFlagStatus(TIM3, TIM_FLAG_Update) == RESET);
02.TIM_ClearFlag(TIM3, TIM_IT_Update);
03.trigger_pin(HIGH);
04.ADC_StartConversion(ADC1);
05.while(ADC_GetFlagStatus(ADC1, ADC_FLAG_EOS) == RESET);
06.ADC_ClearFlag(ADC1, ADC_FLAG_EOS);
07.USART1_putc('1');
08.while(DMA_GetFlagStatus(DMA1_FLAG_TC1) == RESET);
09.DMA_ClearFlag(DMA1_FLAG_TC1);


after which I can dump out the two samples. Works great.


Here is my adc.c file which does this successfully:


001.#include "adc.h"
002.#include "stm32f30x.h"
003.#include "stm32f30x_i2c.h"
004.#include "usart.h"
005.#include "stdint.h"
006.#include "stdio.h"
007.#include "utils.h"
008. 
009.__IO uint16_t calibration_value = 0;
010.uint16_t ADC12ConvertedValue[2];
011. 
012.void ADC_Init(void)
013.{
014.  ADC_InitTypeDef       ADC_InitStructure;
015.  ADC_CommonInitTypeDef ADC_CommonInitStructure;
016.   
017.  /* Configure the ADC clock */
018.  RCC_AHBPeriphClockCmd(RCC_AHBPeriph_DMA1, ENABLE);
019.  RCC_ADCCLKConfig(RCC_ADC12PLLCLK_Div2);
020.   
021.  /* Enable ADC1 clock */
022.  RCC_AHBPeriphClockCmd(RCC_AHBPeriph_ADC12, ENABLE);
023.       
024.  SetupAdcGpio();
025.   
026.  CalibrateAdc();
027.   
028.  ADC_CommonInitStructure.ADC_Mode = ADC_Mode_Independent;
029.  ADC_CommonInitStructure.ADC_Clock = ADC_Clock_AsynClkMode;
030.  ADC_CommonInitStructure.ADC_DMAAccessMode = ADC_DMAAccessMode_Disabled;
031.  ADC_CommonInitStructure.ADC_DMAMode = ADC_DMAMode_Circular;
032.  ADC_CommonInitStructure.ADC_TwoSamplingDelay = 0;
033.  ADC_CommonInit( ADC1, &ADC_CommonInitStructure );
034.   
035.  ADC_StructInit( &ADC_InitStructure );
036.  ADC_InitStructure.ADC_ContinuousConvMode = ADC_ContinuousConvMode_Disable;
037.  ADC_InitStructure.ADC_Resolution = ADC_Resolution_12b;
038.  ADC_InitStructure.ADC_ExternalTrigConvEvent = ADC_ExternalTrigConvEvent_0;
039.  ADC_InitStructure.ADC_ExternalTrigEventEdge = ADC_ExternalTrigEventEdge_None;
040.  ADC_InitStructure.ADC_DataAlign = ADC_DataAlign_Right;
041.  ADC_InitStructure.ADC_OverrunMode = ADC_OverrunMode_Disable;
042.  ADC_InitStructure.ADC_AutoInjMode = ADC_AutoInjec_Disable;
043.  ADC_InitStructure.ADC_NbrOfRegChannel = 2;
044.  ADC_Init(ADC1, &ADC_InitStructure);
045.   
046.  ADC_RegularChannelConfig(ADC1, ADC_Channel_3, 1, ADC_SampleTime_181Cycles5);
047.  ADC_RegularChannelConfig(ADC1, ADC_Channel_4, 2, ADC_SampleTime_181Cycles5);
048.   
049.  ADC_DMAConfig(ADC1, ADC_DMAMode_Circular);
050.   
051.  /* Enable ADC3 */
052.  ADC_Cmd(ADC1, ENABLE);
053.   
054.  /* wait for ADRDY */
055.  while(!ADC_GetFlagStatus(ADC1, ADC_FLAG_RDY));
056.   
057.//  NVIC_InitTypeDef NVIC_InitStructure;
058.//  NVIC_InitStructure.NVIC_IRQChannel = DMA1_Channel1_IRQn;
059.//  NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 2;
060.//  NVIC_InitStructure.NVIC_IRQChannelSubPriority = 2;
061.//  NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
062.//  NVIC_Init(&NVIC_InitStructure);
063.// 
064.  /* Enable the DMA Channel */
065.  SetupAdcDma();
066.  DMA_Cmd(DMA1_Channel1, ENABLE);
067.  /* Enable ADC3 DMA */
068.  ADC_DMACmd(ADC1, ENABLE);
069. 
070.}
071. 
072.void SetupAdcGpio(void)
073.{
074.  GPIO_InitTypeDef    GPIO_InitStructure;
075.   
076.  /* GPIOC Periph clock enable */
077.  RCC_AHBPeriphClockCmd(RCC_AHBPeriph_GPIOA, ENABLE);
078. 
079.  /* Configure ADC Channel7 as analog input */
080.  GPIO_InitStructure.GPIO_Pin = GPIO_Pin_2 | GPIO_Pin_7;
081.  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AN;
082.  GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL ;
083.  GPIO_Init(GPIOA, &GPIO_InitStructure);
084.}
085. 
086.void SetupAdcDma(void)
087.{
088.  /* DMA configuration -----------------------------------------------------*/
089.  DMA_InitTypeDef   DMA_InitStructure;
090. 
091.  /* DMA1 channel1 configuration -------------------------------------------*/
092.  DMA_DeInit(DMA1_Channel1);
093.   
094.  //DMA_InitStructure.DMA_PeripheralBaseAddr = (uint32_t) &ADC1_2->CDR;
095.  DMA_InitStructure.DMA_PeripheralBaseAddr = (uint32_t) &ADC1->DR;
096.  DMA_InitStructure.DMA_MemoryBaseAddr = (uint32_t) &ADC12ConvertedValue[0];
097.  DMA_InitStructure.DMA_DIR = DMA_DIR_PeripheralSRC;
098.  DMA_InitStructure.DMA_BufferSize = 2;
099.  DMA_InitStructure.DMA_PeripheralInc = DMA_PeripheralInc_Disable;
100.  DMA_InitStructure.DMA_MemoryInc = DMA_MemoryInc_Enable;
101.  DMA_InitStructure.DMA_PeripheralDataSize = DMA_PeripheralDataSize_HalfWord;
102.  DMA_InitStructure.DMA_MemoryDataSize = DMA_MemoryDataSize_HalfWord;
103.  DMA_InitStructure.DMA_Mode = DMA_Mode_Circular;
104.  //DMA_InitStructure.DMA_Priority = DMA_Priority_High;
105.  DMA_InitStructure.DMA_Priority = DMA_Priority_Medium;
106.  DMA_InitStructure.DMA_M2M = DMA_M2M_Disable;
107.  DMA_Init(DMA1_Channel1, &DMA_InitStructure);
108. 
109.  //Enable the DMA "transfer complete" (TC) interrupt
110.  //NVIC_InitTypeDef NVIC_InitStructure;
111.  //NVIC_InitStructure.NVIC_IRQChannel = DMA1_Channel1_IRQn;
112.  //NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 2;
113.  //NVIC_InitStructure.NVIC_IRQChannelSubPriority = 2;
114.  //NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
115.  //NVIC_Init(&NVIC_InitStructure);
116. 
117.  //DMA_ITConfig(DMA1_Channel1, DMA1_IT_TC, ENABLE);
118.}
119. 
120.void DMA1_Channel1_IRQHandler(void)
121.{
122.  if(DMA_GetITStatus(DMA1_IT_TC1) != RESET)
123.  {
124.    trigger_pin(1);
125.    DMA_ClearITPendingBit(DMA1_IT_TC1);
126.     
127.    // Do some User Acknowledgement
128.    USART1_putc('!');
129.    trigger_pin(0);
130.     
131.    // Convert ADC values into Engineering Units
132.     
133.    // Package ADC Contents into a CAN msg
134.     
135.    // Request Transmission on the bus
136.     
137.  }
138.}
139. 
140.void Default_Handler(void)
141.{
142.  USART1_putc('?');
143.  while(1);
144.}
145. 
146.void CalibrateAdc(void)
147.{
148.  __IO uint16_t calibration_value_1 = 0;
149.  __IO uint16_t calibration_value_2 = 0;
150. 
151.  /* Setup SysTick Timer for 1 µsec interrupts  */
152.  if (SysTick_Config(SystemCoreClock / 1000000))
153.  {
154.    /* Capture error */
155.    while (1)
156.    {}
157.  }
158. 
159.  /* ADC Calibration procedure */
160.  ADC_VoltageRegulatorCmd(ADC1, ENABLE);
161. 
162.  /* Insert delay equal to 10 µs */
163.  delay(10);
164. 
165. 
166.  ADC_SelectCalibrationMode(ADC1, ADC_CalibrationMode_Single);
167.  ADC_StartCalibration(ADC1);
168. 
169.  while(ADC_GetCalibrationStatus(ADC1) != RESET);
170.  calibration_value_1 = ADC_GetCalibrationValue(ADC1);
171.   
172.    /* Setup SysTick Timer for 1 µsec interrupts  */
173.  if (SysTick_Config(SystemCoreClock / 1000))
174.  {
175.    /* Capture error */
176.    while (1)
177.    {}
178.  }
179.}



You'll see it is commented out. This is when I can check the DMA flags and whatnot to poll for transfer completion. But, if I dare enable the NVIC DMA interrupt, AND call DMA_ITConfig(), (Enabling either sections of code changes nothing about the program, enabling both breaks things) all hell seems to break loose. You'll notice that the order in which I enable all these peripherals is in the order recommended by ST as found at the top of stm32f30x_dma.c.


The program just hangs after starting the adc.


Going to debug mode, I see that the processor gets stuck at some random line in the startupfile. Weird. See the attached. The debug information also shows me that it is impossible to set breakpoints in my DMA interrupt handler. This tells me that I have a linker problem. Is this a bad assumption?


I have triple-check my NVIC interrupt and handler names and I have also tried changing them. The startup file I'm using is the same one that I have alsways been using, and is the same as the default startup file generated by KEIL, or is found in the standard peripheral library.


I have attached it here for review. You can see the spot where the processor hangs is the "B" line after the SPI4_IRQHandler prototype. The processor is in Handler mode at this point in time. Why would it end up there after already running the reset handler upon startup?


001.;******************** (C) COPYRIGHT 2015 STMicroelectronics ********************
002.;* File Name          : startup_stm32f303xe.s
003.;* Author             : MCD Application Team
004.;* Version            : V1.2.2
005.;* Date               : 27-February-2015
006.;* Description        : STM32F303xE devices vector table for MDK-ARM toolchain.
007.;*                      This module performs:
008.;*                      - Set the initial SP
009.;*                      - Set the initial PC == Reset_Handler
010.;*                      - Set the vector table entries with the exceptions ISR address
011.;*                      - Branches to __main in the C library (which eventually
012.;*                        calls main()).
013.;*                      After Reset the CortexM4 processor is in Thread mode,
014.;*                      priority is Privileged, and the Stack is set to Main.
015.;* <<< Use Configuration Wizard in Context Menu >>>  
016.;*******************************************************************************
017.;
018.; Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
019.; You may not use this file except in compliance with the License.
020.; You may obtain a copy of the License at:
021.;
022.;        http://www.st.com/software_license_agreement_liberty_v2
023.;
024.; Unless required by applicable law or agreed to in writing, software
025.; distributed under the License is distributed on an "AS IS" BASIS,
026.; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
027.; See the License for the specific language governing permissions and
028.; limitations under the License.
029.;
030.;*******************************************************************************
031. 
032.; Amount of memory (in bytes) allocated for Stack
033.; Tailor this value to your application needs
034.; <h> Stack Configuration
035.;   <o> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
036.; </h>
037. 
038.Stack_Size      EQU     0x00000800
039. 
040.                AREA    STACK, NOINIT, READWRITE, ALIGN=3
041.Stack_Mem       SPACE   Stack_Size
042.__initial_sp
043. 
044. 
045.; <h> Heap Configuration
046.;   <o>  Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
047.; </h>
048. 
049.Heap_Size       EQU     0x00000800
050. 
051.                AREA    HEAP, NOINIT, READWRITE, ALIGN=3
052.__heap_base
053.Heap_Mem        SPACE   Heap_Size
054.__heap_limit
055. 
056.                PRESERVE8
057.                THUMB
058. 
059. 
060.; Vector Table Mapped to Address 0 at Reset
061.                AREA    RESET, DATA, READONLY
062.                EXPORT  __Vectors
063.                EXPORT  __Vectors_End
064.                EXPORT  __Vectors_Size
065. 
066.__Vectors       DCD     __initial_sp               ; Top of Stack
067.                DCD     Reset_Handler              ; Reset Handler
068.                DCD     NMI_Handler                ; NMI Handler
069.                DCD     HardFault_Handler          ; Hard Fault Handler
070.                DCD     MemManage_Handler          ; MPU Fault Handler
071.                DCD     BusFault_Handler           ; Bus Fault Handler
072.                DCD     UsageFault_Handler         ; Usage Fault Handler
073.                DCD     0                          ; Reserved
074.                DCD     0                          ; Reserved
075.                DCD     0                          ; Reserved
076.                DCD     0                          ; Reserved
077.                DCD     SVC_Handler                ; SVCall Handler
078.                DCD     DebugMon_Handler           ; Debug Monitor Handler
079.                DCD     0                          ; Reserved
080.                DCD     PendSV_Handler             ; PendSV Handler
081.                DCD     SysTick_Handler            ; SysTick Handler
082. 
083.                ; External Interrupts
084.                DCD     WWDG_IRQHandler                   ; Window WatchDog                                       
085.                DCD     PVD_IRQHandler                    ; PVD through EXTI Line detection                       
086.                DCD     TAMPER_STAMP_IRQHandler           ; Tamper and TimeStamps through the EXTI line           
087.                DCD     RTC_WKUP_IRQHandler               ; RTC Wakeup through the EXTI line                      
088.                DCD     FLASH_IRQHandler                  ; FLASH                                          
089.                DCD     RCC_IRQHandler                    ; RCC                                            
090.                DCD     EXTI0_IRQHandler                  ; EXTI Line0                                            
091.                DCD     EXTI1_IRQHandler                  ; EXTI Line1                                            
092.                DCD     EXTI2_TS_IRQHandler               ; EXTI Line2 and Touch                                            
093.                DCD     EXTI3_IRQHandler                  ; EXTI Line3                                            
094.                DCD     EXTI4_IRQHandler                  ; EXTI Line4                                            
095.                DCD     DMA1_Channel1_IRQHandler          ; DMA1 Channel 1                                  
096.                DCD     DMA1_Channel2_IRQHandler          ; DMA1 Channel 2                                  
097.                DCD     DMA1_Channel3_IRQHandler          ; DMA1 Channel 3                                  
098.                DCD     DMA1_Channel4_IRQHandler          ; DMA1 Channel 4                                  
099.                DCD     DMA1_Channel5_IRQHandler          ; DMA1 Channel 5                                  
100.                DCD     DMA1_Channel6_IRQHandler          ; DMA1 Channel 6                                  
101.                DCD     DMA1_Channel7_IRQHandler          ; DMA1 Channel 7                                  
102.                DCD     ADC1_2_IRQHandler                 ; ADC1 and ADC2                           
103.                DCD     USB_HP_CAN1_TX_IRQHandler         ; USB Device High Priority or CAN1 TX
104.                DCD     USB_LP_CAN1_RX0_IRQHandler        ; USB Device Low Priority or CAN1 RX0
105.                DCD     CAN1_RX1_IRQHandler               ; CAN1 RX1                                              
106.                DCD     CAN1_SCE_IRQHandler               ; CAN1 SCE                                              
107.                DCD     EXTI9_5_IRQHandler                ; External Line[9:5]s                                   
108.                DCD     TIM1_BRK_TIM15_IRQHandler         ; TIM1 Break and TIM15                  
109.                DCD     TIM1_UP_TIM16_IRQHandler          ; TIM1 Update and TIM16                
110.                DCD     TIM1_TRG_COM_TIM17_IRQHandler     ; TIM1 Trigger and Commutation and TIM17
111.                DCD     TIM1_CC_IRQHandler                ; TIM1 Capture Compare                                  
112.                DCD     TIM2_IRQHandler                   ; TIM2                                           
113.                DCD     TIM3_IRQHandler                   ; TIM3                                           
114.                DCD     TIM4_IRQHandler                   ; TIM4                                           
115.                DCD     I2C1_EV_IRQHandler                ; I2C1 Event                                            
116.                DCD     I2C1_ER_IRQHandler                ; I2C1 Error                                            
117.                DCD     I2C2_EV_IRQHandler                ; I2C2 Event                                            
118.                DCD     I2C2_ER_IRQHandler                ; I2C2 Error                                              
119.                DCD     SPI1_IRQHandler                   ; SPI1                                           
120.                DCD     SPI2_IRQHandler                   ; SPI2                                           
121.                DCD     USART1_IRQHandler                 ; USART1                                         
122.                DCD     USART2_IRQHandler                 ; USART2                                         
123.                DCD     USART3_IRQHandler                 ; USART3                                         
124.                DCD     EXTI15_10_IRQHandler              ; External Line[15:10]s                                 
125.                DCD     RTC_Alarm_IRQHandler              ; RTC Alarm (A and B) through EXTI Line                 
126.                DCD     USBWakeUp_IRQHandler              ; USB Wakeup through EXTI line                       
127.                DCD     TIM8_BRK_IRQHandler               ; TIM8 Break                 
128.                DCD     TIM8_UP_IRQHandler                ; TIM8 Update               
129.                DCD     TIM8_TRG_COM_IRQHandler           ; TIM8 Trigger and Commutation
130.                DCD     TIM8_CC_IRQHandler                ; TIM8 Capture Compare                                  
131.                DCD     ADC3_IRQHandler                   ; ADC3                                          
132.                DCD     FMC_IRQHandler                    ; FMC                                           
133.                DCD     0                                 ; Reserved                                           
134.                DCD     0                                 ; Reserved                                           
135.                DCD     SPI3_IRQHandler                   ; SPI3                                           
136.                DCD     UART4_IRQHandler                  ; UART4                                          
137.                DCD     UART5_IRQHandler                  ; UART5                                          
138.                DCD     TIM6_DAC_IRQHandler               ; TIM6 and DAC1&2 underrun errors                  
139.                DCD     TIM7_IRQHandler                   ; TIM7                  
140.                DCD     DMA2_Channel1_IRQHandler          ; DMA2 Channel 1                                  
141.                DCD     DMA2_Channel2_IRQHandler          ; DMA2 Channel 2                                  
142.                DCD     DMA2_Channel3_IRQHandler          ; DMA2 Channel 3                                  
143.                DCD     DMA2_Channel4_IRQHandler          ; DMA2 Channel 4                                  
144.                DCD     DMA2_Channel5_IRQHandler          ; DMA2 Channel 5                                  
145.                DCD     ADC4_IRQHandler                   ; ADC4                                       
146.                DCD     0                                 ; Reserved                     
147.                DCD     0                                 ; Reserved                                              
148.                DCD     COMP1_2_3_IRQHandler              ; COMP1, COMP2 and COMP3                                              
149.                DCD     COMP4_5_6_IRQHandler              ; COMP4, COMP5 and COMP6                                             
150.                DCD     COMP7_IRQHandler                  ; COMP7                                              
151.                DCD     0                                 ; Reserved                                     
152.                DCD     0                                 ; Reserved                                  
153.                DCD     0                                 ; Reserved                                  
154.                DCD     0                                 ; Reserved                                  
155.                DCD     0                                 ; Reserved                                          
156.                DCD     I2C3_EV_IRQHandler                ; I2C3 Event                                            
157.                DCD     I2C3_ER_IRQHandler                ; I2C3 Error                                            
158.                DCD     USB_HP_IRQHandler                 ; USB High Priority remap                       
159.                DCD     USB_LP_IRQHandler                 ; USB Low Priority remap                    
160.                DCD     USBWakeUp_RMP_IRQHandler          ; USB Wakeup remap through EXTI                        
161.                DCD     TIM20_BRK_IRQHandler              ; TIM20 Break
162.                DCD     TIM20_UP_IRQHandler               ; TIM20 Update
163.                DCD     TIM20_TRG_COM_IRQHandler          ; TIM20 Trigger and Commutation
164.                DCD     TIM20_CC_IRQHandler               ; TIM20 Capture Compare
165.                DCD     FPU_IRQHandler                    ; FPU                                                    
166.                DCD     0                                 ; Reserved                                     
167.                DCD     0                                 ; Reserved
168.                DCD     SPI4_IRQHandler                   ; SPI4
169.                          
170.__Vectors_End
171. 
172.__Vectors_Size  EQU  __Vectors_End - __Vectors
173. 
174.                AREA    |.text|, CODE, READONLY
175. 
176.; Reset handler
177.Reset_Handler    PROC
178.                 EXPORT  Reset_Handler             [WEAK]
179.        IMPORT  SystemInit
180.        IMPORT  __main
181. 
182.                 LDR     R0, =SystemInit
183.                 BLX     R0
184.                 LDR     R0, =__main
185.                 BX      R0
186.                 ENDP
187. 
188.; Dummy Exception Handlers (infinite loops which can be modified)
189. 
190.NMI_Handler     PROC
191.                EXPORT  NMI_Handler                [WEAK]
192.                B       .
193.                ENDP
194.HardFault_Handler\
195.                PROC
196.                EXPORT  HardFault_Handler          [WEAK]
197.                B       .
198.                ENDP
199.MemManage_Handler\
200.                PROC
201.                EXPORT  MemManage_Handler          [WEAK]
202.                B       .
203.                ENDP
204.BusFault_Handler\
205.                PROC
206.                EXPORT  BusFault_Handler           [WEAK]
207.                B       .
208.                ENDP
209.UsageFault_Handler\
210.                PROC
211.                EXPORT  UsageFault_Handler         [WEAK]
212.                B       .
213.                ENDP
214.SVC_Handler     PROC
215.                EXPORT  SVC_Handler                [WEAK]
216.                B       .
217.                ENDP
218.DebugMon_Handler\
219.                PROC
220.                EXPORT  DebugMon_Handler           [WEAK]
221.                B       .
222.                ENDP
223.PendSV_Handler  PROC
224.                EXPORT  PendSV_Handler             [WEAK]
225.                B       .
226.                ENDP
227.SysTick_Handler PROC
228.                EXPORT  SysTick_Handler            [WEAK]
229.                B       .
230.                ENDP
231. 
232.Default_Handler PROC
233. 
234.                EXPORT  WWDG_IRQHandler                   [WEAK]                                       
235.                EXPORT  PVD_IRQHandler                    [WEAK]                     
236.                EXPORT  TAMPER_STAMP_IRQHandler           [WEAK]        
237.                EXPORT  RTC_WKUP_IRQHandler               [WEAK]                    
238.                EXPORT  FLASH_IRQHandler                  [WEAK]                                        
239.                EXPORT  RCC_IRQHandler                    [WEAK]                                           
240.                EXPORT  EXTI0_IRQHandler                  [WEAK]                                           
241.                EXPORT  EXTI1_IRQHandler                  [WEAK]                                            
242.                EXPORT  EXTI2_TS_IRQHandler               [WEAK]                                           
243.                EXPORT  EXTI3_IRQHandler                  [WEAK]                                          
244.                EXPORT  EXTI4_IRQHandler                  [WEAK]                                           
245.                EXPORT  DMA1_Channel1_IRQHandler          [WEAK]                               
246.                EXPORT  DMA1_Channel2_IRQHandler          [WEAK]                                  
247.                EXPORT  DMA1_Channel3_IRQHandler          [WEAK]                                  
248.                EXPORT  DMA1_Channel4_IRQHandler          [WEAK]                                  
249.                EXPORT  DMA1_Channel5_IRQHandler          [WEAK]                                  
250.                EXPORT  DMA1_Channel6_IRQHandler          [WEAK]                                  
251.                EXPORT  DMA1_Channel7_IRQHandler          [WEAK]                                  
252.                EXPORT  ADC1_2_IRQHandler                 [WEAK]                        
253.                EXPORT  USB_HP_CAN1_TX_IRQHandler         [WEAK]                                               
254.                EXPORT  USB_LP_CAN1_RX0_IRQHandler        [WEAK]                                              
255.                EXPORT  CAN1_RX1_IRQHandler               [WEAK]                                               
256.                EXPORT  CAN1_SCE_IRQHandler               [WEAK]                                               
257.                EXPORT  EXTI9_5_IRQHandler                [WEAK]                                   
258.                EXPORT  TIM1_BRK_TIM15_IRQHandler         [WEAK]                 
259.                EXPORT  TIM1_UP_TIM16_IRQHandler          [WEAK]               
260.                EXPORT  TIM1_TRG_COM_TIM17_IRQHandler     [WEAK]
261.                EXPORT  TIM1_CC_IRQHandler                [WEAK]                                  
262.                EXPORT  TIM2_IRQHandler                   [WEAK]                                           
263.                EXPORT  TIM3_IRQHandler                   [WEAK]                                           
264.                EXPORT  TIM4_IRQHandler                   [WEAK]                                           
265.                EXPORT  I2C1_EV_IRQHandler                [WEAK]                                            
266.                EXPORT  I2C1_ER_IRQHandler                [WEAK]                                            
267.                EXPORT  I2C2_EV_IRQHandler                [WEAK]                                           
268.                EXPORT  I2C2_ER_IRQHandler                [WEAK]                                              
269.                EXPORT  SPI1_IRQHandler                   [WEAK]                                          
270.                EXPORT  SPI2_IRQHandler                   [WEAK]                                           
271.                EXPORT  USART1_IRQHandler                 [WEAK]                                         
272.                EXPORT  USART2_IRQHandler                 [WEAK]                                         
273.                EXPORT  USART3_IRQHandler                 [WEAK]                                        
274.                EXPORT  EXTI15_10_IRQHandler              [WEAK]                                 
275.                EXPORT  RTC_Alarm_IRQHandler              [WEAK]                 
276.                EXPORT  USBWakeUp_IRQHandler              [WEAK]                       
277.                EXPORT  TIM8_BRK_IRQHandler               [WEAK]                
278.                EXPORT  TIM8_UP_IRQHandler                [WEAK]                
279.                EXPORT  TIM8_TRG_COM_IRQHandler           [WEAK]
280.                EXPORT  TIM8_CC_IRQHandler                [WEAK]
281.                EXPORT  ADC3_IRQHandler                   [WEAK]
282.                EXPORT  FMC_IRQHandler                    [WEAK]                                 
283.                EXPORT  SPI3_IRQHandler                   [WEAK]                                            
284.                EXPORT  UART4_IRQHandler                  [WEAK]                                           
285.                EXPORT  UART5_IRQHandler                  [WEAK]                                           
286.                EXPORT  TIM6_DAC_IRQHandler               [WEAK]                  
287.                EXPORT  TIM7_IRQHandler                   [WEAK]                   
288.                EXPORT  DMA2_Channel1_IRQHandler          [WEAK]                                 
289.                EXPORT  DMA2_Channel2_IRQHandler          [WEAK]                                  
290.                EXPORT  DMA2_Channel3_IRQHandler          [WEAK]                                   
291.                EXPORT  DMA2_Channel4_IRQHandler          [WEAK]                                   
292.                EXPORT  DMA2_Channel5_IRQHandler          [WEAK]
293.                EXPORT  ADC4_IRQHandler                   [WEAK]                                
294.                EXPORT  COMP1_2_3_IRQHandler              [WEAK]                                              
295.                EXPORT  COMP4_5_6_IRQHandler              [WEAK]                                              
296.                EXPORT  COMP7_IRQHandler                  [WEAK]
297.                EXPORT  I2C3_EV_IRQHandler                [WEAK]                                              
298.                EXPORT  I2C3_ER_IRQHandler                [WEAK]                                              
299.                EXPORT  USB_HP_IRQHandler                 [WEAK]                     
300.                EXPORT  USB_LP_IRQHandler                 [WEAK]                     
301.                EXPORT  USBWakeUp_RMP_IRQHandler          [WEAK]   
302.                EXPORT  TIM20_BRK_IRQHandler              [WEAK]
303.                EXPORT  TIM20_UP_IRQHandler               [WEAK]
304.                EXPORT  TIM20_TRG_COM_IRQHandler          [WEAK]
305.                EXPORT  TIM20_CC_IRQHandler               [WEAK]             
306.                EXPORT  FPU_IRQHandler                    [WEAK]               
307.                EXPORT  SPI3_IRQHandler                   [WEAK]
308.                           
309.WWDG_IRQHandler                                                      
310.PVD_IRQHandler                                     
311.TAMPER_STAMP_IRQHandler                 
312.RTC_WKUP_IRQHandler                               
313.FLASH_IRQHandler                                                      
314.RCC_IRQHandler                                                           
315.EXTI0_IRQHandler                                                         
316.EXTI1_IRQHandler                                                          
317.EXTI2_TS_IRQHandler                                                         
318.EXTI3_IRQHandler                                                        
319.EXTI4_IRQHandler                                                         
320.DMA1_Channel1_IRQHandler                                      
321.DMA1_Channel2_IRQHandler                                         
322.DMA1_Channel3_IRQHandler                                         
323.DMA1_Channel4_IRQHandler                                         
324.DMA1_Channel5_IRQHandler                                         
325.DMA1_Channel6_IRQHandler                                         
326.DMA1_Channel7_IRQHandler                                         
327.ADC1_2_IRQHandler                                        
328.USB_HP_CAN1_TX_IRQHandler                                                           
329.USB_LP_CAN1_RX0_IRQHandler                                                         
330.CAN1_RX1_IRQHandler                                                          
331.CAN1_SCE_IRQHandler                                                          
332.EXTI9_5_IRQHandler                                               
333.TIM1_BRK_TIM15_IRQHandler                       
334.TIM1_UP_TIM16_IRQHandler                     
335.TIM1_TRG_COM_TIM17_IRQHandler 
336.TIM1_CC_IRQHandler                                              
337.TIM2_IRQHandler                                                          
338.TIM3_IRQHandler                                                          
339.TIM4_IRQHandler                                                          
340.I2C1_EV_IRQHandler                                                        
341.I2C1_ER_IRQHandler                                                        
342.I2C2_EV_IRQHandler                                                       
343.I2C2_ER_IRQHandler                                                          
344.SPI1_IRQHandler                                                         
345.SPI2_IRQHandler                                                          
346.USART1_IRQHandler                                                      
347.USART2_IRQHandler                                                      
348.USART3_IRQHandler                                                     
349.EXTI15_10_IRQHandler                                           
350.RTC_Alarm_IRQHandler                           
351.USBWakeUp_IRQHandler                               
352.TIM8_BRK_IRQHandler                     
353.TIM8_UP_IRQHandler                      
354.TIM8_TRG_COM_IRQHandler 
355.TIM8_CC_IRQHandler 
356.ADC3_IRQHandler
357.FMC_IRQHandler                                           
358.SPI3_IRQHandler                                                           
359.UART4_IRQHandler                                                         
360.UART5_IRQHandler                                                         
361.TIM6_DAC_IRQHandler                           
362.TIM7_IRQHandler                             
363.DMA2_Channel1_IRQHandler                                         
364.DMA2_Channel2_IRQHandler                                          
365.DMA2_Channel3_IRQHandler                                          
366.DMA2_Channel4_IRQHandler                                       
367.DMA2_Channel5_IRQHandler
368.ADC4_IRQHandler
369.COMP1_2_3_IRQHandler                                                         
370.COMP4_5_6_IRQHandler                                                         
371.COMP7_IRQHandler 
372.I2C3_EV_IRQHandler
373.I2C3_ER_IRQHandler                                                       
374.USB_HP_IRQHandler                          
375.USB_LP_IRQHandler                           
376.USBWakeUp_RMP_IRQHandler 
377.TIM20_BRK_IRQHandler
378.TIM20_UP_IRQHandler
379.TIM20_TRG_COM_IRQHandler
380.TIM20_CC_IRQHandler                             
381.FPU_IRQHandler
382.SPI4_IRQHandler                                               
383. 
384.                B       .
385. 
386.                ENDP
387. 
388.                ALIGN
389. 
390.;*******************************************************************************
391.; User Stack and Heap initialization
392.;*******************************************************************************
393.                 IF      :DEF:__MICROLIB
394.                 
395.                 EXPORT  __initial_sp
396.                 EXPORT  __heap_base
397.                 EXPORT  __heap_limit
398.                 
399.                 ELSE
400.                 
401.                 IMPORT  __use_two_region_memory
402.                 EXPORT  __user_initial_stackheap
403.                  
404.__user_initial_stackheap
405. 
406.                 LDR     R0, =  Heap_Mem
407.                 LDR     R1, =(Stack_Mem + Stack_Size)
408.                 LDR     R2, = (Heap_Mem +  Heap_Size)
409.                 LDR     R3, = Stack_Mem
410.                 BX      LR
411. 
412.                 ALIGN
413. 
414.                 ENDIF
415. 
416.                 END
417. 
418.;************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE*****



Things look broken to me. If enabling that single interrupt breaks things, something is seriously wrong. Very bad.


Are there any thoughts on what could be wrong? Any ideas on how to further debug from here?


Attachments

Outcomes