joric / nrfmicro

A Pro Micro alternative for wireless keyboards
https://github.com/joric/nrfmicro/wiki
The Unlicense
1.48k stars 128 forks source link

Unrecognized Device Blue Pill to Blackmagic #61

Closed drakumus closed 2 years ago

drakumus commented 2 years ago

Followed instructions to download blackmagic to blue pill:

When plugging back in the Bluepill windows no longer recognizes the device. image Attempting to install libusb-win32 drivers to the device with zadig fails as well. image This happened on 2 blue-pills.

Plugging in the blue-pills before attempting this process showed up on windows as STM32X device and the fact that UART was successful tells me it's unlikely the Dataline resistor is at fault here. Not sure what to do at this point

joric commented 2 years ago

Maybe this https://github.com/joric/nrfmicro/wiki/Bootloader#possible-issues

drakumus commented 2 years ago

I went through those before posting: The device can be connected overUART so that rules out the pull up resistor. Windows doesn't recognize the device at all so the other issue referenced doesn't help me unfortunately. Their device just needed different USB drivers.

My running theory is the dfu flashed at address 0x800000 doesn't work for my board.

drakumus commented 2 years ago

I bought another set of bluepills. This set matches the images on the troubleshooting page. Checked the resistor value and it is the correct 10k. Connected to the device over UART and realized something: On both boards, iteration doesn't matter, it only detects 32kb of flash. It looks like a minimum of 64kb is required for blackmagic probe.

When I flash over UART using the demo it's slimming down the 52k file to 24k (which is the remaining flash size) When flashing with STM32CubeProgrammer I get a flash too small error. Not sure if there's a way to access 64k flash.

drakumus commented 2 years ago

image image A side by side of the 2 versions of blue pill, left one is the first set I bought, right one is the second set

I just noticed the component that has 32k written on it as well. Checking the aliexpress link you gave the first offering of blue pill on aliexpress also has that 32k: image https://www.aliexpress.com/item/2251832606198485.html?spm=a2g0o.productlist.0.0.c19255bd5Vd8Bm&algo_pvid=523ec5dd-0b85-4b7e-a3fd-aa81b3258e93&algo_exp_id=523ec5dd-0b85-4b7e-a3fd-aa81b3258e93-0&pdp_ext_f=%7B%22sku_id%22%3A%2212000023281119527%22%7D&pdp_npi=2%40dis%21USD%211.64%211.31%21%21%21%21%21%40210318be16617521957707216e152b%2112000023281119527%21sea&curPageLogUid=VDMZgmdUo3Sw

drakumus commented 2 years ago

Ok the issue is clear now. The blue pills I bought off amazon (both types) use the cheaper STM32F103C6T6A (32kb flash) The aliexpress blue pills use STM32F103C8T6 (64kb flash)

I guess let this be a warning that there are blue pills with smaller flash. Didn't know it was possible to purchase a blue pill with not enough flash.