Skip to content
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

Enhanced bilnky does not Work #749

Open
tobbad opened this issue Dec 29, 2023 · 0 comments
Open

Enhanced bilnky does not Work #749

tobbad opened this issue Dec 29, 2023 · 0 comments

Comments

@tobbad
Copy link

tobbad commented Dec 29, 2023

I tried to set up an enhanced blinky with following installed Frameworks
My frameforks are:
##########################################################################
contrib-piohome framework-arduino-avr-microcore framework-stm32cubef0 tool-openocd
framework-arduino-avr framework-arduino-avr-mightycore framework-stm32cubef4 tool-scons
framework-arduino-avr-attiny framework-arduino-avr-minicore tool-avrdude tool-stm32duino
framework-arduino-avr-bean framework-arduino-avr-nicai [email protected] toolchain-atmelavr
framework-arduino-avr-digistump framework-arduino-avr-panstamp tool-cppcheck toolchain-gccarmnoneeabi
framework-arduino-avr-dwenguino framework-arduino-avr-prusa_rambo tool-dfuutil [email protected]
framework-arduino-avr-majorcore framework-arduinoststm32 tool-dfuutil-arduino
framework-arduino-avr-megacore framework-cmsis tool-ldscripts-ststm32
#################################################
I try to run following code:
############################################
#include <Arduino.h>
#include <wiring_digital.h>

#define button PC_13
#define led PA_5
#define rx PA_3
#define tx PA_2
HardwareSerial serial(rx, tx);
void setup() {
pinMode(button, INPUT);
pinMode(led, OUTPUT);

serial.begin(115200);
serial.println("Initalization done");
}

void loop() {
uint32_t state;
delay(200);
state = digitalRead(button);
serial.println("Loop state ");
serial.println(state);
if (state)
{
serial.println("Button pushed");
}
digitalWrite(led, !digitalRead(led));
}
#######################################################33
platform.ini is
###################################33
; PlatformIO Project Configuration File
[env:nucleo_l476rg]
platform = ststm32
board = nucleo_l476rg
framework = arduino
debug_build_flags = -Og -ggdb -g3 -fno-eliminate-unused-debug-symbols
####################################################
The debug options should remove all optimization, but they have no effect.
The button does make any effect. It seems, that it can not be read. The docu can be found here: I use a Nucleo-L476 (https://www.st.com/content/ccc/resource/technical/layouts_and_diagrams/schematic_pack/group2/74/18/73/70/3c/70/4a/52/MB1136-DEFAULT-C04_Schematic/files/MB1136-DEFAULT-C04_Schematic.pdf/jcr:content/translations/en.MB1136-DEFAULT-C04_Schematic.pdf, https://www.st.com/resource/en/user_manual/um1724-stm32-nucleo64-boards-mb1136-stmicroelectronics.pdf). The soulution with removing the "_" claimed as my solution does not work.
I see the same Error with a [env:nucleo_401rg].
Original Posting is here:
See my problem in https://community.platformio.org/t/enhanced-blinky-with-button-and-led-does-not-work/37375
I tried to control the LED (PC_7) on the x-NucleoS2686A2 but the led can not be lit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant