Skip to content

Support STM32F105RCT6 #1925

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
CzokNorris opened this issue Jan 19, 2023 · 4 comments
Closed

Support STM32F105RCT6 #1925

CzokNorris opened this issue Jan 19, 2023 · 4 comments
Labels
new variant Add support of new bard

Comments

@CzokNorris
Copy link

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

Any questions/feedback/suggestions should be discussed on the stm32duino forum:

⚠ 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:

  1. Plug
  2. Press USER_BTN
  3. 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.

@CzokNorris
Copy link
Author

Screenshot 2023-01-19 at 23 05 30

@CzokNorris
Copy link
Author

Didnt see that Board part number can be edited. Leaving it here however, because the F105 is not in the list. Is there a way to add it to the list. Selected F103RCT from the list and now this error is not appearing

@fpistm
Copy link
Member

fpistm commented Jan 20, 2023

Hi,

First your sketch is not correct, you used PinName instead of pin number. So instead of PC_7 you have to use PC7.
To add a variant you can follow this wiki:
https://github.com/stm32duino/wiki/wiki/Add-a-new-variant-(board)

I've added the STM32F105RCT6 to the request list #722

@fpistm fpistm changed the title Pin names messed up in STM32F105 and crash when writing digital pins > 35 Support STM32F105RCT6 Jan 20, 2023
@fpistm fpistm added the new variant Add support of new bard label Jan 20, 2023
@brightproject
Copy link

Hi,

First your sketch is not correct, you used PinName instead of pin number. So instead of PC_7 you have to use PC7. To add a variant you can follow this wiki: https://github.com/stm32duino/wiki/wiki/Add-a-new-variant-(board)

I've added the STM32F105RCT6 to the request list #722

New link on wiki @fpistm

https://github.com/stm32duino/Arduino_Core_STM32/wiki/Add-a-new-variant-(board)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new variant Add support of new bard
Projects
None yet
Development

No branches or pull requests

3 participants