Giter VIP home page Giter VIP logo

Comments (15)

FASTSHIFT avatar FASTSHIFT commented on August 23, 2024 1

@namkihop
Software I2C.

from arduino-for-keil.

FASTSHIFT avatar FASTSHIFT commented on August 23, 2024

@klerone

  1. If you want to modify the default software I2C pins, you need to modify the pins in the "Wire.h" file.
  2. The 8M external crystal oscillator is used by default. If you want to use the built-in crystal oscillator, you need to call the "InternalClocks_Init()" function before the "Delay_Init()" function.
  3. If you want to download programs larger than 16KB into "STM32F030F4P6", you can try to change the MCU selection to "STM32F030C6" in "Options for Target->Device".
    Z_W{TN C1H4XK25FQ L2TJN

Hope to help you.

from arduino-for-keil.

klerone avatar klerone commented on August 23, 2024

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!

from arduino-for-keil.

FASTSHIFT avatar FASTSHIFT commented on August 23, 2024

@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.

from arduino-for-keil.

klerone avatar klerone commented on August 23, 2024

@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
#include "Arduino.h"

#define LED_Pin PA4
#define KEY_Pin PA0

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()
{ }``

from arduino-for-keil.

FASTSHIFT avatar FASTSHIFT commented on August 23, 2024

@klerone
EXTI problem has been solved, please update.

from arduino-for-keil.

klerone avatar klerone commented on August 23, 2024

Great, it works!

Thank you!

from arduino-for-keil.

klerone avatar klerone commented on August 23, 2024

@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.

from arduino-for-keil.

FASTSHIFT avatar FASTSHIFT commented on August 23, 2024

@klerone
You can try to recreate the project manually, and then import the necessary files.

from arduino-for-keil.

klerone avatar klerone commented on August 23, 2024

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.

from arduino-for-keil.

namkihop avatar namkihop commented on August 23, 2024

image
image
image

Blue pill I2c not found on your library but on Arduino I2C is 0x27.

from arduino-for-keil.

FASTSHIFT avatar FASTSHIFT commented on August 23, 2024

@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.

from arduino-for-keil.

namkihop avatar namkihop commented on August 23, 2024

image
tôi đã thử nhưng nó không hoạt động, bạn có mẫu ví dụ nào về i2c không?

from arduino-for-keil.

FASTSHIFT avatar FASTSHIFT commented on August 23, 2024

@namkihop
Bạn có thể thử các thiết bị I2C khác không? Đảm bảo hủy FULL_SPEED_I2C.

from arduino-for-keil.

namkihop avatar namkihop commented on August 23, 2024

image
it worked, let me ask is this i2c soft or hard? thank you.

from arduino-for-keil.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.