i made a visual TFT-Project with some additional code. It all worked fine until i implemented an
interrupt function for timer2;
I used your timer calculator for the interrupt.
Code: Select all
//Timer2 Prescaler :11; Preload = 62499; Actual Interrupt Time = 5 ms
//Place/Copy this part in declaration section
void InitTimer2(){
RCC_APB1ENR.TIM2EN = 1;
TIM2_CR1.CEN = 0;
TIM2_PSC = 11;
TIM2_ARR = 62499;
NVIC_IntEnable(IVT_INT_TIM2);
TIM2_DIER.UIE = 1;
TIM2_CR1.CEN = 1;
}
void Timer2_interrupt() iv IVT_INT_TIM2 {
TIM2_SR.UIF = 0;
//Enter your code here
// LastMessBolzen.ADC_RawValue = c420mar_getADCvalue();
// Filter( &LastMessBolzen );
Delay_ms(3);
// Frequenzumrichter.ADC_RawValue = ADC1_Get_Sample(8);
// Filter( &Frequenzumrichter );
}
_I2Cx_Get_Status:
;__Lib_I2C_123.c, 160 ::
; I2C_BASE start address is: 0 (R0)
0x01A0 0xB081 SUB SP, SP, #4
; I2C_BASE end address is: 0 (R0)
; I2C_BASE start address is: 0 (R0)
;__Lib_I2C_123.c, 163 ::
0x01A2 0xF2000114 ADDW R1, R0, #20
0x01A6 0x680A LDR R2, [R1, #0]
;__Lib_I2C_123.c, 164 ::
0x01A8 0xF2000118 ADDW R1, R0, #24
It looks like some I2C routines for the touch panel.
The timer interrupt still works fine.
I use a mikromedia plus for STM32 ARM and the newest version of VTFT and Compiler.
Do you have any tips to solve this Problem?
Best Regards
Mario