Closed klerone closed 2 years ago
@klerone
Hope to help you.
Great! Now it's working, I read the BMP085 using adafruit's library, but there is a problem with function pow(), anyway I just cancelled that part because it used too much resources.
You are telling me that 16Kb is not the real flash in this MCU? I loaded one that the compiler said is 18kb, I thought is the compiler was calculating wrong.
Thank you for your support.
You are the man!
@klerone The FLASH of "STM32F030F4P6" is actually 32KB. The manufacturer only tested the space of the first 16KB, and the stability of the latter 16KB is not guaranteed, but it can be used.
@FASTSHIFT
I have problems to get the interrupts working, my board has a button connected to PA0, it has a PULLUP resistor and the button is active LOW.
I'm using the code from the example EXTI, with the changes for my settings.
It just do nothing when i push the button, nothing happens. the button is fine, i tested it using the button in the arduino style (reading the status inside the loop).
Can you please point me in the right direction?
``//External interrupts
void LED_Toggle() { //Serial.println("KEY is pressed!"); togglePin(LED_Pin); }
void setup() { Serial.begin(57600); pinMode(LED_Pin, OUTPUT); digitalWrite(LED_Pin, HIGH); pinMode(KEY_Pin, INPUT); attachInterrupt(KEY_Pin, LED_Toggle, FALLING); //attachInterrupt(digitalPinToInterrupt(KEY_Pin), LED_Toggle, FALLING);
}
void loop() { }``
@klerone EXTI problem has been solved, please update.
Great, it works!
Thank you!
@FASTSHIFT
I have been testing different libraries, all work. but since yesterday I got a problem that i have not idea how to solve.
with the new release of the code suddenly started to get this error: FCARM - Output Name not specified, please check 'Options for Target - Utilities'
I checked if i change something by mistake and all looks fine, then I downloaded one more copy of the example and compile, i works, then i added a library and could not compile.
before this started to happen all was OK, I loaded many libraries and compile and test.
the old release is fine.
I hope you can point me in the right direction, I cannot find too much help in keil's website.
@klerone You can try to recreate the project manually, and then import the necessary files.
Ok, problem solved.
One more question, is it possible to use the PF0 and PF1 as normal GPIO? I tried to blink a LED, it did not work.
Blue pill I2c not found on your library but on Arduino I2C is 0x27.
@namkihop Try to reduce the I2C rate. You can try to comment out the FULL_SPEED_I2C macro definition of Wire.h. If communication still cannot be established, you can try to set SOFT_FAST -> SOFT_STANDARD of the Wire instance at the end of Wire.cpp to further reduce the I2C rate.
tôi đã thử nhưng nó không hoạt động, bạn có mẫu ví dụ nào về i2c không?
@namkihop Bạn có thể thử các thiết bị I2C khác không? Đảm bảo hủy FULL_SPEED_I2C.
it worked, let me ask is this i2c soft or hard? thank you.
@namkihop Software I2C.
Hello FASTSHIFT.
I am a hobbyist of Arduino and recently discovered your job and I have been playing with it for 2 or 3 days, I blinked a LED, fade in and out and printed to serial using your examples, so far, so good.
I bought some months ago a board with STM32F030F4P6 (SSOP-20 package), really cheap and I have been working to move some of attiny84 projects to this MCU, not luck with it, code was too big until I found your project.
Now I am trying to Port some of the Arduino libraries for my sensors and screens, many of them are I2C (BMP085, BME280, OLED SSD1306...) So first I tried to use the I2C scanner code from the Arduino community but seems it hangs up the whole thing and don't even get serial Port outputs.
I will be very happy if you can help me on it.
This is the code:
This is my board: By the way, the code use the internal oscillator or external?