Trouble getting started with SparkFun Blues Wireless MicroMod Starter Kit -STM32F405 no serial port?

Hello!

This is my first time working with low level hardware. Please forgive my ignorance :slight_smile:

I recently picked up a SparkFun Blues Wireless MicroMod Starter Kit. I’ve been attempting to complete the tutorial on Blues’ website, but haven’t succeeded.

When I plug my USB cable into the main board - no COM port is shown in Device Manager (Windows 10). If I put it into DFU mode by holding boot + tapping reset then I see “STM 32 BOOTLOADER” shown in Universal Seris Bus devices. So, I believe my cable works OK and my computer can see the device, but it does not see it as being able to communicate.

I can upload sketches to it through the Arduino IDE and don’t get any errors, but the code doesn’t seem to run as far as I can tell. Here’s the output I get when I upload some basic example code:


USB speed : Full Speed (12MBit/s)

Manuf. ID : STMicroelectronics

Product ID : STM32 BOOTLOADER

SN : 325037773132

DFU protocol: 1.1

Board : --

Device ID : 0x0413

Device name : STM32F405xx/F407xx/F415xx/F417xx

Flash size : 1 MBytes (default)

Device type : MCU

Revision ID : -- 

Device CPU : Cortex-M4

Memory Programming ...

Opening and parsing file: sketch_may17b.ino.bin

File : sketch_may17b.ino.bin

Size : 42.30 KB 

Address : 0x08000000 

Erasing memory corresponding to segment 0:

Erasing internal memory sectors [0 2]

sector 0000 does not exist

sector 0001 does not exist

sector 0002 does not exist

Download in Progress:

File download complete

Time elapsed during download operation: 00:00:01.206

RUNNING Program ... 

Address: : 0x8000000

Start operation achieved successfully

I looked into drivers for it but the latest explicitly shipped drivers were for Win7/Win8. There’s a note in the README that says:


* V1.5.0 - 02/05/2018

=====================

New Features

************

+ Install simplified for better user experience depending on Windows OS,

+ For Windows 10, use Microsoft inbox driver and not this package.

which I think means that it should be plug-and-play in Windows 10.

https://community.st.com/t5/stm32-mcus- … d-p/437577 this person describes a similar issue, but their resolution was soldering?? It’s unclear if that’s my issue and that’s too extreme of a step for me getting my hands dirty.

It’s not clear to me if I’m wildly off base somewhere. I am able to get a COM port when I plug a USB into my Notecarrier Function Board but when I query the state of the function board it’s not updated to reflect the commands that should’ve been sent by the firmware I uploaded to the processor.

For clarity, here’s the code I’m uploading:


#include <Notecard.h>

#define productUID "com.gmail.Meo.DDR:feed_connect"

#define usbSerial Serial

Notecard notecard;

void setup() {

delay(2500);

// put your setup code here, to run once:

usbSerial.begin(115200);

notecard.begin();

notecard.setDebugOutputStream(usbSerial);

J *req = notecard.newRequest("hub.set");

JAddStringToObject(req, "product", productUID);

JAddStringToObject(req, "mode", "continuous");

notecard.sendRequest(req);

}

void loop() {

// put your main code here, to run repeatedly:

}

After I upload this, I tap reset on my main board, wait, and then un {"req":"hub.get"} but I see my mode is still in “periodic” not set to “continuous”

Thanks for your time

You can add some minor checks to your code. Open the Serial Monitor in the Arduino IDE to check for any debug messages printed by your sketch. This will help you see if the Notecard is being initialized and if requests are being sent.

#include <Notecard.h>

#define productUID "com.gmail.Meo.DDR:feed_connect"
#define usbSerial Serial

Notecard notecard;

void setup() {
  delay(2500);

  // Initialize serial communication
  usbSerial.begin(115200);
  while (!usbSerial) {
    ; // wait for serial port to connect
  }

  usbSerial.println("Starting Notecard...");

  // Initialize Notecard
  notecard.begin();
  notecard.setDebugOutputStream(usbSerial);

  usbSerial.println("Sending request to Notecard...");

  J *req = notecard.newRequest("hub.set");
  if (req != NULL) {
    JAddStringToObject(req, "product", productUID);
    JAddStringToObject(req, "mode", "continuous");
    notecard.sendRequest(req);
    usbSerial.println("Request sent.");
  } else {
    usbSerial.println("Failed to create request.");
  }
}

void loop() {
  // put your main code here, to run repeatedly:
}

Thanks for the response!

No, I don’t see anything when I add more extensive logging.

However, I asked on the Blues forums and someone pointed me to https://community.st.com/t5/stm32cubepr … d-p/654294

Apparently the latest version of STM32CubeProgrammer shipped with a known issue preventing writes. This was indicated in the logs I provided but I wasn’t clever enough to see the issue.

Erasing internal memory sectors [0 2]
sector 0000 does not exist
sector 0001 does not exist
sector 0002 does not exist
Download in Progress:

This is no good.

Erasing memory corresponding to segment 0:
Erasing internal memory sectors [0 2]
erasing sector 0000 @: 0x08000000 done
erasing sector 0001 @: 0x08004000 done
erasing sector 0002 @: 0x08008000 done
Download in Progress:

This is good.

I still don’t see logging, but I do see my code affecting the function board. So, progress and I’m hopeful I can make more progress debugging the logging issue here soon.

Okay! I figured it out after that. The solution to get debug logs working was to go: “Tools → USB Support → CDC” after fixing the data writing issue.