Page 2 of 2

Re: Using the internal (HSI) generator f103c8t6

Posted: Mon Jan 27, 2020 12:02 pm
by stm32_discover
Hi Steve,I checked the test sketch on the Maple mini Board, everything works with quartz, but it doesn't work without quartz

Code: Select all

#define USE_HSI_CLOCK 1

void setup() {
  // put your setup code here, to run once:
pinMode(PA0,OUTPUT);
pinMode(PA1,OUTPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
digitalWrite(PA0,HIGH);
digitalWrite(PA1,HIGH);
delay(1000);
digitalWrite(PA0,LOW);
digitalWrite(PA1,LOW);
delay(1000);
}

Re: Using the internal (HSI) generator f103c8t6

Posted: Mon Feb 03, 2020 9:13 pm
by stevestrong
You have to include

Code: Select all

#define USE_HSI_CLOCK 1
in the file "board.h" of your variant.

For example, bluepill board.h can be found here: https://github.com/rogerclarkmelbourne/ ... rd/board.h

or in the variant header: https://github.com/rogerclarkmelbourne/ ... /variant.h

Re: Using the internal (HSI) generator f103c8t6

Posted: Thu Dec 24, 2020 5:00 pm
by Shashi Bhushan
I am facing the same issue.

Tried the STM cube IDE with auto code generator and blinked LED using HSI clock selected.

Now running same LED Blinky code with Arduino it is not running. The board is custom and doesn't have crystal.

Done above all things but nothing worked !

Just want to enable HSI in Arduino and disable HSE.

My board is perfect and working ! blinking LED at PB12 using STM cube IDE and clock HSI ! :!: :!: :!: :!:

Code: Select all

#include <Arduino.h>
#define USE_HSI_CLOCK 1
 void setup()
  {
    pinMode(PB12,OUTPUT);
  }
void loop()
{
  digitalWrite(PB12,HIGH);
  delay(1000);
   digitalWrite(PB12,LOW);
   delay(1000);
}