0
\$\begingroup\$

Writing a USB driver for the "Blue Pill" - sub $2 board from China.

The STM32F103 has a USM packet memory of 512 bytes. The USB sees this memory as 256 words. The Application has to access this memory on 32bit boundaries so I us DW access.

As a test - a wrote a data pattern into the array then read it out to verify its contents. I found many single bit failures.

Has anyone experienced this?

I'm wondering if China may be using ST parts that did not past all of ST's MFG testing and the one I got had issues with this memory array.

Any comments? My recourse right now is to scrap the board.

Thanks

\$\endgroup\$
4
  • \$\begingroup\$ First check if your code is responsible for the errors. Flash the stm32duino bootloader, and see if the board is programmable with arduino ide. I assume it will fail if the IC is bad. \$\endgroup\$
    – Vlad
    Apr 30, 2020 at 17:00
  • \$\begingroup\$ Thanks but I don't use Arduino for anything. I've been hand crafting code for 40 years now. \$\endgroup\$
    – JHinkle
    Apr 30, 2020 at 17:22
  • \$\begingroup\$ I didn't mean to make you use it, just run the code that was tested on thousands of boards out there, and see if that's really the chip responsible for errors. \$\endgroup\$
    – Vlad
    Apr 30, 2020 at 18:14
  • \$\begingroup\$ Perhaps this link might be useful \$\endgroup\$ May 1, 2020 at 4:26

2 Answers 2

1
\$\begingroup\$

It's probably a cloned STM32 part.

Some of them have missing features, and some have even fixed problems with the original (debug). Another $2 board from the same supplier may well behave exactly the same.

\$\endgroup\$
0
\$\begingroup\$
  1. Yes, there a lot of fake STM32F103 chips on the China's market. Several Chinese firms make "almost completely identical" F103 chips but with their own design (GD32F103, CS32F103 and so on).

Many of them are selling with fake STM markings, creating appearance that they are original STM chips (possibly, lacking of STM logo, but not necessarily; different font etc).

So, you can never be sure. The budgetary price of original STM32F103 is about $2.05 itself for minimal order of 10k units, so it's hard to expect original chips on these Chinese $2.00 Blue-pill boards with a lot of other components.

On the other hands, this fake STM32F103 can work without problems on 95-99% of tasks.

  1. Known problem with USB drivers on STM32 device is small default Heap size of 0x200 in provided linker scripts. Try to increase it according to your needs.
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.