Description
I am using version stm32duino version 2.4.0
My Arduino IDE is 1.8.19
The chip is STM32F105RCT6 on a custom board
When I
digitalWrite(36, HIGH);
or for example
digitalWrite(PC_7, HIGH);
the program stops running on my board.
And I have checked. The pin names are wrong.
4 is supposed to be PA4, but in reality toggles PB5 (package pin 57)
5 is supposed to be PA5, but in reality toggles PB4 (package pin 56)
(supposed to be is taken from here: https://github.com/stm32duino/Arduino_Core_STM32/blob/main/variants/STM32F1xx/F105R(8-B-C)T/variant_generic.cpp)
I have not checked the other leds.
This sketch stops running after 10 seconds (led stops blinking):
#define LED2 PB3
#define SimpleSwitchOutControl PC_7
void setup() {
//LEDs: When driven LOW, they are off. When driven HIGH, they are illuminated
pinMode(LED2, OUTPUT);
pinMode(SimpleSwitchOutControl, OUTPUT);
digitalWrite(LED2, LOW);
}
void loop() {
if (millis() % 1000 < 100){
digitalWrite(LED2, HIGH);
}else{
digitalWrite(LED2, LOW);
}
if (millis() > 10000){
if (millis() % 2000 < 1000){
digitalWrite(SimpleSwitchOutControl, HIGH);
}else{
digitalWrite(SimpleSwitchOutControl, LOW);
}
}
}
What do do?
Please, before reporting any issue
- Make sure you are using the latest Arduino_Core_STM32 version.
https://github.com/stm32duino/Arduino_Core_STM32/releases/latest - Make sure the issue is not already reported/fixed on GitHub or discussed on the stm32duino forum
- Submit a GitHub issue only for reporting a problem related to the Arduino_Core_STM32.
- Avoid to submit a GitHub issue for project troubleshooting.
Any questions/feedback/suggestions should be discussed on the stm32duino forum:
- questions on the STM32 Core
- bugs/enhancements on the STM core: Bugs and enhancements
⚠ When reporting any issue, please try to provide all relevant information to help on its resolution.
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Complete source code which can be used to reproduce the issue. Please try to be as generic as possible (no extra code, extra hardware,...)
Steps to reproduce the behavior:
- Plug
- Press USER_BTN
- See error
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: [e.g. Windows]
- Arduino IDE version: [e.g. 1.8.8]
- STM32 core version: [e.g. 1.4.0]
- Tools menu settings if not the default: [e.g. Newlib Standard, No Serial]
- Upload method: [e.g. SWD]
Board (please complete the following information):
- Name: [e.g. Nucleo F429ZI]
- Hardware Revision: [e.g. Rev B]
- Extra hardware used if any: [e.g. X-Nucleo IKS01A1]
Additional context
Add any other context about the problem here.