STM32 woes

User avatar
johu
Site Admin
Posts: 5681
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 959 times
Contact:

STM32 woes

Post by johu »

As Bart just found out, JLCPCB have removed the STM32F103RBT6 from their library. Like completely, it's not even an extended part. For those who don't know, that is the main processor that has been used for openinverter for the last 10 years.
Also it seems the price has exploded to around $12.

viewtopic.php?p=26235#p26235

Possible replacements
  • STM32F103R8T6
    Structurally identical to the RBT6 but only has 64k flash. Thats ok, the bootloader uses 4k, firmware 40k, parameters 2k. Would leave us with 58k for the firmware which at the current growth rate would last still a bit. Would need to implement flash size detection to find the correct location for storing parameters and CAN mapping
  • STM32F103RET6
    Has 512k flash and I assume larger page size. Would need adjustment of bootloader and also flash size/page size detection. Seems to have richer peripherals also.
    Both the RET6 and R8T6 are basic parts
  • STM32F2*, STM32F3, STM32F105RBT6, STM32F107R*
    Extended part and poor stock situation.
  • STM32F412RET6
    Extended part, even more expensive ($24), libopencm3 not fully fleshed out (per some time last year) so lots of software changes and completion of libopencm3 needed
  • GigaDevices parts
    Super cheap ($1.50 for the GD32F103RBT6) but mostly untested. Revealed one small compatibility issue when tested on BMS. Extended part and poor stock situation.
  • STM32F0
    Lacking performance (48 MHz, 8k SRAM)
I'm leaning towards R8T6 or RET6 and it would be easy to handle both in software.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
jon volk
Posts: 572
Joined: Wed Apr 10, 2019 7:47 pm
Location: Connecticut
Been thanked: 2 times

Re: STM32 woes

Post by jon volk »

May be worth a try
https://lcsc.com/product-detail/GigaDev ... ef=jlc-SMT

JLC lists as an extended part.
Formerly 92 E30 BMW Cabrio with Tesla power
User avatar
johu
Site Admin
Posts: 5681
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 959 times
Contact:

Re: STM32 woes

Post by johu »

Added to list above. A bit problematic.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
FJ3422
Posts: 113
Joined: Fri Jul 10, 2020 9:55 am
Location: Netherlands
Been thanked: 1 time

Re: STM32 woes

Post by FJ3422 »

Experienced a sudden disappearance of components as well during last months. Even parts that were in decently in stock (1000+) a couple of days before. It looks like they might be selling stock through the backdoor due the global semiconductor shortage and thus exploded prices.
JaniK
Posts: 391
Joined: Sun Aug 25, 2019 12:39 pm
Location: Finland
Has thanked: 49 times
Been thanked: 10 times

Re: STM32 woes

Post by JaniK »

Oh crap, this too, hmm..
Any opinions are my own, unless stated otherwise. I take no responsibility if you follow my way of doing things and it doesn't work. Please double check with someone who knows what they are doing.
User avatar
mikmur
Posts: 46
Joined: Sat Jul 18, 2020 7:37 am
Location: Georgia/Batumi
Has thanked: 33 times

Re: STM32 woes

Post by mikmur »

I bought a 2 submodule STM32F103RCT6, ARM; Flash: 256 KB; 72MGc; SRAM: 48KB. I think it will go
Attachments
TB2q1O8dw9J.eBjSsppXXXAAVXa_!!529126874.jpg
TB2_VkmcxRzc1FjSZFPXXcGAFXa_!!529126874.jpg
O1CN01uYNCzY1OVDsHzYz2J_!!0-item_pic.jpg
User avatar
johu
Site Admin
Posts: 5681
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 959 times
Contact:

Re: STM32 woes

Post by johu »

Yes that's probably the 256k variant. I will certainly replace the static addresses and page sizes with a dynamic one.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Bart
Posts: 25
Joined: Fri Feb 07, 2020 1:23 pm
Location: Netherlands
Contact:

Re: STM32 woes

Post by Bart »

Hey all,

I have contacted JLCPCB about this: they say this chip is temporarily out. Apparently, ST components have been in shortage lately. If they have it back in stock, they will add it to their library again. They could not give me an estimation of when that will happen. I have asked them if it will certainly come back at some point, and they said that they will keep trying until they can find new stock. This makes it a bit difficult to judge whether one should wait or resort to alternatives, but it can be a reassurance for the patient ones among us.

All the best,
Bart
yaroslav
Posts: 176
Joined: Tue Aug 13, 2019 4:32 pm
Location: Russia, Stavropol
Has thanked: 14 times
Been thanked: 5 times

Re: STM32 woes

Post by yaroslav »

Greetings, as the law of meanness, just finished designing a new logic board, the processors for it ran out. will the CPU pinout change?
User avatar
johu
Site Admin
Posts: 5681
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 959 times
Contact:

Re: STM32 woes

Post by johu »

No, pin out will not change.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
yaroslav
Posts: 176
Joined: Tue Aug 13, 2019 4:32 pm
Location: Russia, Stavropol
Has thanked: 14 times
Been thanked: 5 times

Re: STM32 woes

Post by yaroslav »

Hi, I want to order the board on jlcpcb, what kind of processor can I use?
Attachments
logika4_cr.jpg
logika3_cr.jpg
logika2_cr.jpg
logika1_cr.jpg
User avatar
johu
Site Admin
Posts: 5681
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 959 times
Contact:

Re: STM32 woes

Post by johu »

STM32F103R8T6 or RET6. I'm currently working on a boot loader and firmware that supports various memory sizes.

The flash size is easily determined with desig_get_flash_size().
The page size must be deduced from the type in DBGMCU_IDCODE
- The F103RBT6 is a medium density device and identified by 0x410 and have a page size of 1k
- The F105 and F107 are "Connectivity line devices" identified by 0x418 and have a page size of 2k
- The F103RET6 is a high density device, identified by 0x414, page size 2k

I think that should be all relevant ones for recent projects
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
joromy
Posts: 371
Joined: Fri Jun 28, 2019 12:56 pm
Has thanked: 1 time
Been thanked: 3 times

Re: STM32 woes

Post by joromy »

johu wrote: Sun Apr 11, 2021 11:01 am As Bart just found out, JLCPCB have removed the STM32F103RBT6 from their library. Like completely, it's not even an extended part. For those who don't know, that is the main processor that has been used for openinverter for the last 10 years.
Also it seems the price has exploded to around $12.
I have made boards for many many years, and I don't understand the fuzz about JLCPCB. There are many others that can make boards with any components you want and not very much higher prize.
The faith of the openinverter boards should not lay in the hands of PCB manufacturer and their component stock.

Maybe you should go back to the piggyback version, then the chip pinout and type are more flexible, even possible to use completely different microcontroller.

What about this, or is that something completely different:

viewtopic.php?f=3&t=1574
Thomas A. Edison “I have not failed. I've just found 10,000 ways that won't work"
User avatar
mackoffgrid
Posts: 93
Joined: Thu Jan 02, 2020 10:18 am
Location: Brisbane Australia
Has thanked: 4 times

Re: STM32 woes

Post by mackoffgrid »

JLC have been fantastic - very low cost and even more, convenient for those of us who are prototyping and building for ourselves.

While it may be more expensive, it may be better during these times for those like Johannes and Damien who need better supply - Pre-buy the critical parts -( processors) and use PCBWAY and the like. (unless you like hand soldering SMD) ;) I've experienced this before - (the RAM shortages of the late eighties, and others)
https://github.com/mackelec/SolarUte
meFDCAN Arduino Library 3 FDCAN port stm32G4xx
meCAN Arduino Library 2023 version 2/3 CAN port stm32F0xx, stm32F1xx, stm32F4xx, stm32L4xx
esyjam
Posts: 2
Joined: Thu Jun 04, 2020 9:53 pm
Location: Tanzania

Re: STM32 woes

Post by esyjam »

johu wrote: Tue Apr 13, 2021 7:59 pm STM32F103R8T6 or RET6. I'm currently working on a boot loader and firmware that supports various memory sizes.

The flash size is easily determined with desig_get_flash_size().
The page size must be deduced from the type in DBGMCU_IDCODE
- The F103RBT6 is a medium density device and identified by 0x410 and have a page size of 1k
- The F105 and F107 are "Connectivity line devices" identified by 0x418 and have a page size of 2k
- The F103RET6 is a high density device, identified by 0x414, page size 2k

I think that should be all relevant ones for recent projects
How about going for STM32G431?
User avatar
johu
Site Admin
Posts: 5681
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 959 times
Contact:

Re: STM32 woes

Post by johu »

I have unified the boot loader to work on both 1k and 2k page size devices: viewtopic.php?f=7&t=1587

Likewise added flash size and page size auto-detection to the two modules in libopeninv that write to flash: CAN and param_save
esyjam wrote: Sat Apr 17, 2021 8:32 pm How about going for STM32G431?
It is not in stock at JLCPCB and would require a large porting burden.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
johu
Site Admin
Posts: 5681
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 959 times
Contact:

Re: STM32 woes

Post by johu »

So turns out reading DBGMCU_IDCODE is unreliable on older devices. So I changed the boot loader again. It deletes a page assuming it is 1k. Before deleting the next page it will check if it was already deleted. If so, we deleted a 2k page in the first place. In any case we always collect 2k of data from the serial port and then flash it.

The firmware uses a similar pattern. Now parameters and CAN mapping may end up in the same flash page.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Alex_kip
Posts: 1
Joined: Fri May 21, 2021 9:23 am

Re: STM32 woes

Post by Alex_kip »

yaroslav wrote: Tue Apr 13, 2021 6:38 pm Hi, I want to order the board on jlcpcb, what kind of processor can I use?
Hi Yaroslav! The question is not in this topic. I'm a newbie here, I wanted to talk to a russian-speaking. I downloaded to BluePill firmware, PC13 blinks. Through esp or directly through the terminal, I receive only an echo in response to all commands. I dug up the forum - I don't understand what I did wrong. Tell me in which direction to look for the error. If possible, give me a contact. My email kiprotor@mail.ru
User avatar
crasbe
Posts: 234
Joined: Mon Jul 08, 2019 5:18 pm
Location: Germany
Has thanked: 43 times
Been thanked: 97 times

Re: STM32 woes

Post by crasbe »

It seems like JLCPCB has added the STM32F103RBT6 again, even though it's now at around $21 and they only have 1 in stock..

I would not recommend using the Giga Device Clone. I've read more than one report of not all features working as they should or as expected.
Automotive electronics usually demands the highest reliability, so using a part that might not behave as expected it not really something I'd feel comfortable with.
User avatar
johu
Site Admin
Posts: 5681
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 959 times
Contact:

Re: STM32 woes

Post by johu »

Yes I'll definitely not use GigaDevices on anything I sell, just for my own prototypes.
So far I'm selling STM32F103R8T6 which only has 64k of flash. It is sufficient for the 40k firmware though (+2k parameters, +4k boot loader)
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
johu
Site Admin
Posts: 5681
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 959 times
Contact:

Re: STM32 woes

Post by johu »

It's getting harder. Now JLCPCB do not stock ANY LQFP64 variant of the STM32 anymore. Neither does mouser, digikey or any other big name suppliers. I found some at an obscure Hong Kong distributor (https://www.win-source.net/stmicroelect ... bt7tr.html) and will have a local company solder them onto the otherwise populated boards. Might need to raise prices a bit.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
MattsAwesomeStuff
Posts: 871
Joined: Fri Apr 26, 2019 5:40 pm
Has thanked: 278 times
Been thanked: 165 times

Re: STM32 woes

Post by MattsAwesomeStuff »

One can only imagine, if the OEMs are in crisis, just how bad it is for everyone else.

Also, component cost being such a small portion of a business, we're seeing toilet paper hording levels, creating even more shortages than there otherwise would've been.

Now is a bad time for anyone to start experimenting with their hardware and blowing it up :P.

I do wonder how long before us commoners will have broad component access again.

Higher prices seem quite reasonable to me. Charge what they're worth.
User avatar
johu
Site Admin
Posts: 5681
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 959 times
Contact:

Re: STM32 woes

Post by johu »

You are right, it's gold mining time:
STM32F103RBT7TR: We are sorry to tell you that the old batch of this part which was at $8.027/pc has been sold out, the new batch of it is a little expensive. But to show our apologies, we have applied the loyal customers` price for you, which is $40/pc, total price difference is $6394.6 and this part is on tray.
On their site they still quote about $8 - clickbait
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
johu
Site Admin
Posts: 5681
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 959 times
Contact:

Re: STM32 woes

Post by johu »

So what this means is that I have to way to restock LDU boards right now. Since boards are my main revenue stream I had to increase prices to make the most of my existing stock. Nobody knows when this situation is resolved.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Isaac96
Posts: 656
Joined: Sat Oct 05, 2019 6:50 pm
Location: Northern California, USA
Been thanked: 1 time
Contact:

Re: STM32 woes

Post by Isaac96 »

If the "loyal customers' price" is $40 who knows what the common man pays...
Post Reply