This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

problem with capacitance measuring with stm32f103RE

hi, I'm trying to measure a capacitor's value and send it to the uart terminal. I'm using stm32f103re and I'm using registers. i attached the circuit I'm using and also my code.  when I connect the circuit to stm32 or when i connect the A1 pin to 3.3 volts the result is the same and I attached the response of the terminal. the problem is that the timer interrupt routine only executes once and i can't figure out why.  

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include "stm32f10x.h"
#include "stdio.h"
void SysTick_Handler (void);
void Delay_ms (uint32_t dlyTicks);
volatile uint32_t msTicks;
unsigned int value = 0;
int Data=0;
int counter=0;
char string[50];
char string2[50];
int time=0;
double charge_time=0;
double c=0;
double period=1.0/72000000;
int flag=0;
int val_Tx = 0; /* Globals used for display */
int AD_last=0;
int flag2;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

0