[Answered] AnalogRead() for PC3 stucked of STM32F103RCT6
Posted: Sat Apr 04, 2020 9:26 am
Version: STM32 Core 1.8.0
Arduino Verison: 1.8.12
UploadMethod: ST_LINK
Chip:STM32F103RCT6
code:
HardwareSerial Uart1(PA10,PA9);
int fold_current;
void setup() {
pinMode(PC3,INPUT_ANALOG);
Uart1.begin(9600);
}
void loop()
{
fold_current = analogRead(PC3);
Uart1.println(fold_current);
delay(100);
}
After Upload this code, it will stuck and nothing print out from the Uart1.
but works fine and print out the value for other pins, simple replace the PC3 to other pins will work.
the pins i have tried:
PC1
PC2
PC4
PC5
PA1
Hardware: 2 different boards with STM32F103RCT6. one is my self-made boards. another is the AlienTEK develop Boards. which can be found www.alientek.com( MiniSTM32F103 )
I tried to check the pin-Map, it seems OK.
Arduino Verison: 1.8.12
UploadMethod: ST_LINK
Chip:STM32F103RCT6
code:
HardwareSerial Uart1(PA10,PA9);
int fold_current;
void setup() {
pinMode(PC3,INPUT_ANALOG);
Uart1.begin(9600);
}
void loop()
{
fold_current = analogRead(PC3);
Uart1.println(fold_current);
delay(100);
}
After Upload this code, it will stuck and nothing print out from the Uart1.
but works fine and print out the value for other pins, simple replace the PC3 to other pins will work.
the pins i have tried:
PC1
PC2
PC4
PC5
PA1
Hardware: 2 different boards with STM32F103RCT6. one is my self-made boards. another is the AlienTEK develop Boards. which can be found www.alientek.com( MiniSTM32F103 )
I tried to check the pin-Map, it seems OK.