Hello everyone,
I've started off using Arduino Nanos and built a couple little projects. One is a power meter for the house mains. It is based off of the OpenEnergyMonitor project. Works pretty good, but just not the resolution I need/want.
I've started off using Arduino Nanos and built a couple little projects. One is a power meter for the house mains. It is based off of the OpenEnergyMonitor project. Works pretty good, but just not the resolution I need/want.
So I got some STM32F103C8T6 boards. Here are the ones I got: ebay.com/itm/323591665224
moderator edit, seller relisted as
https://www.ebay.com/itm/STM32F103C8T6- ... 3632180484
I would like to use one of these to upgrade the Energy Monitor project to a faster and greater resolution.
My current problem is that I can't seem to flash it with anything "other" than the firmware that came with the boards. I used the STM Demonstrator GUI program to pull a good copy of the firmware off the boards. I use this to reflash the boards if something doesn't work (which is 100% atm). The default firmware will bootup and flash PC13 at about 1000ms.
I have tried flashing:
generic_boot20_pb12.bin
generic_boot20_pc13.bin
generic_boot20_pc13_fastboot.bin
maple_mini_boot20.bin
All of which do not show up when I connect via the USB cable. I know the cable works as it works just fine with several other devices (cell phones, tablets, etc). The only way I can flash is using an FTDI232 board. I have even tried compiling the Arduino blink and then using the Demonstrator to upload the bin file, and it still didn't blink.
Here's the code I'm using:
Code: Select all
int pins[] = {PC13, PC14, PC15};
// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin PB1 as an output.
for (int i = 0; i < 3; i++)
{
pinMode(pins[i], OUTPUT);
}
}
// the loop function runs over and over again forever
void loop() {
for (int i = 0; i < 3; i++)
{
digitalWrite(pins[i], HIGH);
}
delay(500); // wait for a second
for (int i = 0; i < 3; i++)
{
digitalWrite(pins[i], LOW);
}
delay(500); // wait for a second
}
Another thing to note, I followed the advice of roger and went to the wiki where it shows the boards are shipped with the wrong resistor value. Sure enough, my boards have the 10k instead of the 1.5k. But, this is for direct USB control. Even after adding resistors to get 1.5k across the two pins, I still couldn't detect the board properly in Device Manager. It shows up as "Unknown USB Device (Device Descriptor Request Failed)". I know that's a different problem, but figured I'd mention it here in case it might be related.
System:
Windows 10 Pro 10.0.17134 Build 17134
AMD FX-6100
Arduino 1.8.5
TIA,
Kori