Author Topic: [Fixed] Can't flash PFM3 on Windows 11 via Chrome or WSL dfu-util  (Read 5032 times)

armandhammer

  • Team member
  • *
  • Posts: 8
    • View Profile
Quote
This issue is FIXED! However there are more issues below in the replies.

The solution was to use the free Zadig software to install a proper driver so that Windows 11 recognized the PFM3 in DFU Mode. Then I was able to flash the bootloader using Chrome, and the firmware using dfu-util on the command line.


I tried flashing via Chrome, but it doesn't see the device. However, in my Windows 11 "Devices and Printers" control panel, I clearly see a device labeled "DFU in FS Mode". And when I connect in Boot0 mode, a device named "preenfm3" is connected. I tried everything which shows up under the "Connect" button on the DFU webpage, but it can never find the PFM3 "DFU in FS Mode". I only see the message NotFoundError: No device selected.

I also tried it via WSL Ubuntu, following the instructions to create the file /etc/udev/rules.d/46-stm32.rules with the text ATTRS{idProduct}=="df11", ATTRS{idVendor}=="0483", MODE="664", GROUP="plugdev", but when I run:

dfu-util -a0 -d 0×0483:0xdf11 -D p3_boot_1_08.bin -s 0x8000000

It gives the response:

Invalid DFU suffix signature
A valid dfu suffix will be required in a future dfu-util release!!!
unable to initialize libusb: -99


Help?
« Last Edit: November 01, 2021, 02:19:21 AM by armandhammer »

armandhammer

  • Team member
  • *
  • Posts: 8
    • View Profile
Re: Can't flash PFM3 on Windows 11 via Chrome or WSL dfu-util
« Reply #1 on: October 20, 2021, 11:45:40 AM »
Issue 2: The screen never comes on after I plug in the PFM3.
Quote
FIXED!!! The issue was that the GND pin of the Boot0 jumper was not making proper contact. I fluxed and reflowed the header pin and now it boots up properly.

I noticed that if I short the Rst and Gnd pins next to the CPU, the screen turns on and I can use the PFM3. All buttons, encoders, menus work and I get sound from all of the outputs. So it seems to be 100% working as far as I can tell, except the screen does not come on until I reset the CPU. Not in regular bootup, not when booting the bootloader via [MENU].

Issue 3: Inserting an SD card causes the screen to go black

Quote
FIXED!!! The problem was that I received a TFT screen from AliExpress which had a wrong SD pinout / PCB tracks. It was a "No Touch" version and said v1.0 on the PCB. I ordered a Touch version which says v1.2 on the PCB and it works now.

I reflowed SD slot pins, I did point-to-point tracing, checked for any bridging, it still doesn't work. I tried switching from 5V to 3.3V, no difference.

I tested all of the headers on the board and everything is connecting where it's supposed to go -- LCD headers and SD Card headers, all the way from the TFT board through to the PFM3 mainboard. Nothing is disconnected, nothing is bridged. I have not touched any of the pre-soldered components.

I've built a few dozen DIY synths before, so I'm pretty good at finding bad connections and everything seems fine. Except the screen won't come on at bootup, and putting a card into the SD slot causes it to go black.

TFT module problem? If so, what pins might be the issue? What should I test with my DMM?
« Last Edit: November 01, 2021, 02:18:54 AM by armandhammer »

armandhammer

  • Team member
  • *
  • Posts: 8
    • View Profile
Re: Can't flash PFM3 on Windows 11 via Chrome or WSL dfu-util
« Reply #2 on: October 20, 2021, 01:59:04 PM »
If Xavier or somebody doesn't have a better suggestion, I will order a new TFT and see if that solves the problem.
« Last Edit: October 20, 2021, 03:34:49 PM by armandhammer »

Xavier

  • Administrator
  • Hero Member
  • *
  • Posts: 2256
    • View Profile
Re: Can't flash PFM3 on Windows 11 via Chrome or WSL dfu-util
« Reply #3 on: October 20, 2021, 09:29:25 PM »
For your first problem, i ship all PCB flashed.
I don't know how why you had to flash yours. Did i miss one ?
Anyway thanks for the update and posting your solution  :)

There are some TFT from aliexpress with wrong SD tracks.
Check that your track are the same as on this picture :
https://github.com/Ixox/preenfm3/wiki/TFT

If SD tracks are OK.
Have you tried the official SD formater mentioned here
https://github.com/Ixox/preenfm3/wiki/SD-card


The fact that the TFT switch on after a reset is weird. I don't understand what's happening.
Can you try to plug only the bottom part of the TFT and not the top 4 pins (which are the SD connection) ?
Does the preenfm start with the TFT on ?
« Last Edit: October 20, 2021, 09:32:02 PM by Xavier »

armandhammer

  • Team member
  • *
  • Posts: 8
    • View Profile
Re: Can't flash PFM3 on Windows 11 via Chrome or WSL dfu-util
« Reply #4 on: October 20, 2021, 11:49:44 PM »
Thanks for the help.

Quote
For your first problem, i ship all PCB flashed.

From reading the wiki, it sounds like every PCB needs to be flashed. I must have understood it wrong.

Flashing the pfm3 bootloader only needs to be done once. So if your preenfm has never been flashed (that's the case if you just receive the PCBs), follow "Flash the pfm3 bootloader".

Quote
There are some TFT from aliexpress with wrong SD tracks.

I think this is the problem. The SD tracks don't match. The brand is "TZT" from "TZT teng Official Store" on AliExpress.

Also, I notice that all the 2.8 No-Touch TFT that I see on AliExpress and Amazon.co.jp (I'm in Japan) do not have the proper offset for the TFT pins. The mounting holes are directly in-line with the pins, instead of being ~3mm below the pins, so the pins do not line up with the PFM3 PCB. I had to install longer pins and bend them in a "Z" shape to make it fit. It seems only the Touch version has the correct alignment?

I will order the Touch version from Amazon. It seems to have the correct PCB tracks and pin alignment.

Quote
The fact that the TFT switch on after a reset is weird. I don't understand what's happening.
Can you try to plug only the bottom part of the TFT and not the top 4 pins (which are the SD connection) ?

I tried plugging only the bottom pins of TFT, but the screen still didn't come on, and SD card insert still made the screen go black. I will try a new TFT Touch version with the correct PCB tracks and see what happens. Maybe it's causing all of these problems. Anyway, I can still make some music while I wait for the new TFT :)
« Last Edit: October 21, 2021, 12:19:14 AM by armandhammer »

armandhammer

  • Team member
  • *
  • Posts: 8
    • View Profile
Re: Can't flash PFM3 on Windows 11 via Chrome or WSL dfu-util
« Reply #5 on: October 21, 2021, 12:26:43 AM »
Here's a pic of the TFT, in case you want to add it to the wiki as "non-working type".

https://imgur.com/a/9XWqAgu

Xavier

  • Administrator
  • Hero Member
  • *
  • Posts: 2256
    • View Profile
Re: Can't flash PFM3 on Windows 11 via Chrome or WSL dfu-util
« Reply #6 on: October 21, 2021, 09:14:51 AM »
Here's a pic of the TFT, in case you want to add it to the wiki as "non-working type".
https://imgur.com/a/9XWqAgu

I'll do that eventually.
But your PCB is definitely wrong.
The SD tracks wire the wrong pins. That's crazy this PCB is still buyable.

I never saw a non working version on amazon. But double check the back of the PCB and the SD tracks.


Flashing the pfm3 bootloader only needs to be done once. So if your preenfm has never been flashed (that's the case if you just receive the PCBs), follow "Flash the pfm3 bootloader".

Thanks, i'll fix that. (EDITED : Done  :) )


Quote
The fact that the TFT switch on after a reset is weird. I don't understand what's happening.
I tried plugging only the bottom pins of TFT, but the screen still didn't come on, and SD card insert still made the screen go black. I will try a new TFT Touch version with the correct PCB tracks and see what happens. Maybe it's causing all of these problems. Anyway, I can still make some music while I wait for the new TFT :)

Thanks for the feedback, and yes please update when you receive your new TFT.
« Last Edit: October 21, 2021, 09:38:38 AM by Xavier »

armandhammer

  • Team member
  • *
  • Posts: 8
    • View Profile
Re: Can't flash PFM3 on Windows 11 via Chrome or WSL dfu-util
« Reply #7 on: October 21, 2021, 02:58:06 PM »
New TFT SD Card slot works. I can load firmware in bootloader mode, and I can load and save presets normally.

However, the TFT still does not come on unless I reset the CPU. Not in bootloader mode, or normal mode. Holding [MENU][-] to force TFT refresh has no effect. As far as I can tell, this is the only problem. Otherwise the sound, outputs, MIDI, buttons, encoders, all work totally fine.

What should I trace / measure / examine to figure out why the CPU isn't turning on the TFT at power-up? I've tried powering it with 2 different 9V DC adapters, as well as powering it via USB only. No difference. I looked at all the PCB with a microscope and I don't see any stray pieces of metal, all the pins on CPU look fine, I cleaned whole board of flux with 99% IPA... all the usual best practices.

I have jumpers on:

- DC In
- USB Gnd
- TFT Vcc 5V (tried also 3.3V, no difference)
- Boot0 middle pin and Gnd

No other jumpers anywhere else, except when I moved DC In jumper to USB 5v to test USB power.

I will be away from my studio until Sunday, so there is no hurry to figure it out.

Xavier

  • Administrator
  • Hero Member
  • *
  • Posts: 2256
    • View Profile
Re: Can't flash PFM3 on Windows 11 via Chrome or WSL dfu-util
« Reply #8 on: October 22, 2021, 08:00:39 AM »
Thanks for the update.

First time i hear about this problem.  ???

The TFT led is controlled by a PWM to allow adjusting the brightness.
Can you confirm the TFT is totally black ? No led at all.
Or do you see the screen turning a bit bright without anything on it ?

Can you try firmware 1.05   ?
https://github.com/Ixox/preenfm3/releases/tag/v0.105
This version does not have the brightness control and just turn on the led.
Does this firmware make a difference ?

« Last Edit: October 22, 2021, 09:14:23 AM by Xavier »

armandhammer

  • Team member
  • *
  • Posts: 8
    • View Profile
Re: Can't flash PFM3 on Windows 11 via Chrome or WSL dfu-util
« Reply #9 on: October 22, 2021, 11:28:45 AM »
I’m not with the PFM3 right now, so I can’t check for sure… but it seems like there’s no activity from the TFT at power-up. No flicker/flash, no dark pixels… it appears exactly the same as when there’s no power, until I reset the CPU — then it clearly turns on, and a split second later I see the text on the display.

As for firmware 105, this is what the PFM3 came with and the TFT didn’t turn on then either (until reset CPU). But that was with the previous TFT with weird SD traces. So I will revert from 108 to 105 on Monday and see what happens with the new TFT. I suspect it won’t make any difference.

Anyway, tell me if you have any other idea just in case 105 doesn’t work either. Thanks and have a nice weekend :)

Xavier

  • Administrator
  • Hero Member
  • *
  • Posts: 2256
    • View Profile
Re: Can't flash PFM3 on Windows 11 via Chrome or WSL dfu-util
« Reply #10 on: October 24, 2021, 09:39:22 PM »
If the 0.105 does not work, can you with this firmware measure the Led pin when the preenfm3 is on and the screen is black :
Led pin Should be 3.3v.

armandhammer

  • Team member
  • *
  • Posts: 8
    • View Profile
Re: Can't flash PFM3 on Windows 11 via Chrome or WSL dfu-util
« Reply #11 on: October 29, 2021, 10:37:12 AM »
FIXED!!!!!!!!!!!!!!!!!!!!!

It was the GND pin at Boot0 not fully connected, even though it looked perfect. I added more flux and reflowed it. Now it boots fine.
« Last Edit: October 29, 2021, 11:18:32 AM by armandhammer »

forestcaver

  • Team member
  • *
  • Posts: 18
    • View Profile
Re: [Fixed] Can't flash PFM3 on Windows 11 via Chrome or WSL dfu-util
« Reply #12 on: November 03, 2021, 06:01:34 PM »
Just one datapoint - my pcb wasn’t flashed either by the way. Not a problem at all as I absolutely didnt expect it to be and wasnt aware you *were* flashing them.... :-)
Unless the flashing is a recent thing (I think mine was a very early one).....

Xavier

  • Administrator
  • Hero Member
  • *
  • Posts: 2256
    • View Profile
Re: [Fixed] Can't flash PFM3 on Windows 11 via Chrome or WSL dfu-util
« Reply #13 on: November 03, 2021, 10:17:52 PM »
Just one datapoint - my pcb wasn’t flashed either by the way. Not a problem at all as I absolutely didnt expect it to be and wasnt aware you *were* flashing them.... :-)
Unless the flashing is a recent thing (I think mine was a very early one).....

Yes, the early ones were not flashed  :)
I now flash them because i found a quick method to do so and helping people who cannot flash can be tricky.

forestcaver

  • Team member
  • *
  • Posts: 18
    • View Profile
Re: [Fixed] Can't flash PFM3 on Windows 11 via Chrome or WSL dfu-util
« Reply #14 on: November 05, 2021, 07:31:02 PM »
Yes, the early ones were not flashed  :)
I now flash them because i found a quick method to do so and helping people who cannot flash can be tricky.

Excellent !! Hope you didnt mind me mentioning it :-)
(I do think it’s an amazing synth - thanks Xavier)