Re: Bluepill F4 board, anyone still working on it?
Posted: Wed Jan 01, 2020 10:25 am
PB11 is not available on the board, it seems.
Everything relating to using STM32 boards with the Arduino IDE and alternatives
https://www.stm32duino.com/
i've only done stevstrong's libmaple so i'd comment only on libmaple, usb-serial works,Bingo600 wrote: Wed Jan 01, 2020 9:31 amHappy new year.ag123 wrote: Tue Dec 31, 2019 4:00 pm it works STM32F401 black pill - steve's libmaple core
https://youtu.be/LEJK8lathQc
and happy new year everyone![]()
Does usb-serial , bootloader & upload work too ?
I'll have to try (on the 11') when i get back home
/Bingo
Code: Select all
dfu-util -a 0 -s 0x8000000 -D blackpill_f401.bin
that is a sharp catch!
Code: Select all
#include <Arduino.h>
#include <math.h>
#include "whetstone.h"
void cosfade();
#define PER 20
#define REP 10
int8_t led = 0;
bool dir = false;
int8_t n = PER;
int cnt = 0;
void setup() {
// put your setup code here, to run once:
pinMode(LED_BUILTIN,OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
char r;
if(Serial.available()) {
r = Serial.read();
if(r=='w')
whetstone(84); //84mhz
}
cosfade();
}
uint8_t p = 0;
void cosfade() {
digitalWrite(LED_BUILTIN,led);
led = ~led & 1;
if(led)
delay(PER-p);
else
delay(p);
if(cnt>REP) {
float nf, perf;
n = n>PER?0:n+1;
nf = n * 1.0;
perf = PER * 1.0;
p = perf * ( cos(2 * PI * nf/perf) / 2.0 + 0.5 );
cnt=0;
} else
cnt++;
}
void blinks() {
for (int i = 0; i < 5; i++) {
digitalWrite(LED_BUILTIN, HIGH);
delay(100);
digitalWrite(LED_BUILTIN, LOW);
delay(100);
}
}
Code: Select all
dfu-util -a 0 -s 0x8000000 -D whetblinky.bin
Code: Select all
WEAK void SystemClock_Config(void)
{
...
// 84 Mhz
// RCC_OscInitStruct.PLL.PLLM = 25;
// RCC_OscInitStruct.PLL.PLLN = 336;
// RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV4;
// RCC_OscInitStruct.PLL.PLLQ = 7;
// 96 Mhz
RCC_OscInitStruct.PLL.PLLM = 25;
RCC_OscInitStruct.PLL.PLLN = 192;
RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2;
RCC_OscInitStruct.PLL.PLLQ = 4;
I might be confused here , but does Official Core mean ST core ?ag123 wrote: Thu Jan 02, 2020 5:43 pm just like to say the f401 black pill works 'out of the box' in stm32duino official core
yup ST's core
Code: Select all
$ dfu-util -a 0 -s 0x8000000 -D blackpill_f401o3.bin
dfu-util 0.9
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
Opening DFU capable USB device...
ID 0483:df11
Run-time device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
Determining device status: state = dfuERROR, status = 10
dfuERROR, clearing status
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 2048
DfuSe interface name: "Internal Flash "
Downloading to address = 0x08000000, size = 39880
Download [=========================] 100% 39880 bytes
Download done.
File downloaded successfully
Beginning Whetstone benchmark at 84 MHz ...
Loops:10000, Iterations:1, Duration:8380.95 millisec
C Converted Single Precision Whetstones:119.32 Mflops
Code: Select all
dfu-util -a 0 -s 0x8000000 -D whetblinky.bin
dfu-util 0.9
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
Opening DFU capable USB device...
ID 0483:df11
Run-time device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
Determining device status: state = dfuERROR, status = 10
dfuERROR, clearing status
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 2048
DfuSe interface name: "Internal Flash "
Downloading to address = 0x08000000, size = 36808
Download [=========================] 100% 36808 bytes
Download done.
File downloaded successfully
Beginning Whetstone benchmark at 84 MHz ...
Loops:10000, Iterations:1, Duration:4654.92 millisec
C Converted Single Precision Whetstones:214.83 Mflops
Code: Select all
$ dfu-util -a 0 -s 0x8000000 -D whetblinkyoc.bin
dfu-util 0.9
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
Opening DFU capable USB device...
ID 0483:df11
Run-time device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
Determining device status: state = dfuERROR, status = 10
dfuERROR, clearing status
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 2048
DfuSe interface name: "Internal Flash "
Downloading to address = 0x08000000, size = 36808
Download [=========================] 100% 36808 bytes
Download done.
File downloaded successfully
Shows up as ttyACM3 hereBeginning Whetstone benchmark at 84 MHz ...
Loops:10000, Iterations:1, Duration:4072.66 millisec
C Converted Single Precision Whetstones:245.54 Mflops