IOsetting / py32f0-template

Puya PY32F002A PY32F003 PY32F030 GNU GCC SDK, template and examples
159 stars 60 forks source link

(Not an issue) Another company making the same IC? #34

Open NoNamedCat opened 8 months ago

NoNamedCat commented 8 months ago

I normally see the list of MCU's searching for new and interesting strange parts... While doing that I stumped on another part that have a similar name: APM32F003F6P6 Here is the link: https://www.lcsc.com/product-detail/Microcontroller-Units-MCUs-MPUs-SOCs_Geehy-APM32F003F6P6_C2975251.html Could be that many companies start using the same dye, rebranding only the name in the package?

kimstik commented 8 months ago

most of them are different. there is even RISC-V based ones with similar part numbering.

Nable80 commented 8 months ago

Geehy (APM32) definitely predates PUYA (PY32) and have their own RnD.

APM32F003 is an interesting thing: it's based on Cortex-M0 but it's extremely compatible to STM8S003 (pinout and peripherals are veeeery close, and it can work with VCC=5V, of course). Other manufacturers also made MCUs like that (with ARM or 8051 cores and STM8S compatibility).

PY32 appeared later but brings more interesting peripherals.

IOsetting commented 8 months ago

Geehy's M3 and M4 are quite attractive, as they are binary compatible with STM32 and the prices are relatively low. I haven't used their M0 yet, but I am quite sure APM32F003 is not PY32F003.

deividAlfa commented 7 months ago

What's the point? You can get a stm32g030 with faster clock and larger memory for way less than that apm.

prosper00 commented 7 months ago

something like so?: APM32F003F6P6 https://a.aliexpress.com/_mtvUqBE

Still, good point about the G030, at about the same price point. (actually, the G030 is a even better deal, as it's likely identical to higher end G0xx devices like the 041, with some 'hidden' capabilities)

deividAlfa commented 7 months ago

I know. Everything is there, 64KB flash, peripherals... except the AES peripheral is locked out and nRST pin cannot be remapped.

Nable80 commented 7 months ago

The last time I checked the prices, APM32 and others (especially PY32) were more attractive than STM32, even the STM32G0 series isn't really cheap (I'm also afraid of getting faked ones). Speed and flash size aren't the main concerns when you need a relatively large pack of low-end MCUs (well, there are also the lowest end ones, OTP/MTP 8-bit little nightmares that require special programming hardware to burn firmware and have other known issues but I don't need that large quantities to deal with this kind of stuff). I rarely hit the upper speed limit, sometimes I even need their capability for extreme down-clocking. Thank you for details about STM32G030/041 anyway, I'll look at them more attentively.

deividAlfa commented 7 months ago

I got them from AliExpress, 32cent each, worked well and were detected as genuine, all the peripherals from the g041 were there, also the current consumption was very close to the values in the datasheet. A cheap clone would not pack the higher end model peripherals. But you never know being AliExpress.

IOsetting commented 7 months ago

In China mainland the price of STM32G030F6P6 is around 1.5CNY(0.2USD) each, PY32F002A/PY32F003Fx6 is around 0.6CNY(0.09USD), and APM32F003F6P6 is 1.1CNY(0.15USD). Looks APM32F003F6P6 is not quite competitive in this level.

Nable80 commented 7 months ago

Btw, one of the reasons why I tried APM32F003 (long time ago) is its wide Vcc range (2.2~5.5V), it was unusual for ARM-based MCUs. I can power it from LiON cell directly and it'll be totally OK. I liked this feature of original STM8Sxxx and I was very excited to find and ARM-based MCU with this capability (and even lower price). Nowadays there are even STM32 clones (note: APM32F003 is closer to STM8S family than to STM32F0; its core is an awesome CM0+ though) with this feature. Original STM32G0xx is still tied to 3.3V so it's not really competitive for some of my use-cases.

prosper00 commented 7 months ago

take a look at the ch32v003 and (i think) the hk32f030m4 then too. uber cheap, and 5V parts. the ch32v003 seems positioned as an stm8 alternative, judging by the naming scheme. i havent looked at the pinout against stm8 tho

decaday commented 7 months ago

I normally see the list of MCU's searching for new and interesting strange parts... While doing that I stumped on another part that have a similar name: APM32F003F6P6 Here is the link: https://www.lcsc.com/product-detail/Microcontroller-Units-MCUs-MPUs-SOCs_Geehy-APM32F003F6P6_C2975251.html Could be that many companies start using the same dye, rebranding only the name in the package?

i know AIR001 (tssop20 32k 4k 48mhz) produced by Luat(合宙) is same die as py32f030/003.

and XL32F001 XL32F002 XL32F003 produced by xinlinggo(芯岭) are same die.It has many packges.

These chips are slightly cheaper than py32 based on the performance specifications listed in the datasheet. ( But in fact it may not.)

xinlinggo is also a agent for Puya.

Nable80 commented 7 months ago

take a look at the ch32v003 and (i think) the hk32f030m4 then too. uber cheap, and 5V parts. the ch32v003 seems positioned as an stm8 alternative, judging by the naming scheme. i havent looked at the pinout against stm8 tho

I heard about ch32v003 a lot, it's a real breakthrough, and the great @cnlohr provided a lot of code samples for it, he even managed to implement V-USB. I have some objections against RISC-V (and WCH's tradition of undocumented registers and proprietary blobs really hurts me) but I'm going to try this MCU anyway.

HK32 is interesting: not great, not terrible, just a good clone of STM32 (I tried HK32F103 only). It's always important to have a working alternative, so I appreciate the work of this manufacturer. It had some know issues (they may be fixed now but check the datasheet and errata documents attentively) but the workarounds are trivial and the vendor provides all required information.

Nable80 commented 7 months ago

i know AIR001 (tssop20 32k 4k 48mhz) produced by Luat(合宙) is same die as py32f030/003.

and XL32F001 XL32F002 XL32F003 produced by xinlinggo(芯岭) are same die.It has many packges.

These chips are slightly cheaper than py32 based on the performance specifications listed in the datasheet. ( But in fact it may not.)

xinlinggo is also a agent for Puya.

Wait, are PY32F003 and PY32F030 similar or even the same? I thought they're completely different beasts but thanks to your message I noticed that PY32F030 doesn't look similar to STM32F030 (and other F030 clones). Thank you for the information about XL32 and AIR001, it's something new for me.

IOsetting commented 7 months ago

are PY32F003 and PY32F030 similar or even the same?

They are the same, along with PY32F002A.

and XL32F001 XL32F002 XL32F003 produced by xinlinggo(芯岭) are same die.It has many packges.

XL32F001 is not. Its equivalence is PY32F002B

Nable80 commented 7 months ago

Oh, that's awesome to know. Btw, I had a hard time recently while comparing PY32F002A and PY32F002B datasheets (I decided to order some PY32 samples and found that both models are available on LCSC and their price is close). PUYA's naming approach is quite hardcore, thank you very much for this clarification.

Luckey1996 commented 7 months ago

Btw, one of the reasons why I tried APM32F003 (long time ago) is its wide Vcc range (2.2~5.5V), it was unusual for ARM-based MCUs. I can power it from LiON cell directly and it'll be totally OK. I liked this feature of original STM8Sxxx and I was very excited to find and ARM-based MCU with this capability (and even lower price). Nowadays there are even STM32 clones (note: APM32F003 is closer to STM8S family than to STM32F0; its core is an awesome CM0+ though) with this feature. Original STM32G0xx is still tied to 3.3V so it's not really competitive for some of my use-cases.

I had exactly the same reason to try APM32F003 and now there is one of my door automation product using APM32F003. Do you still use it and what kind of product you designed?

decaday commented 7 months ago

and XL32F001 XL32F002 XL32F003 produced by xinlinggo(芯岭) are same die.It has many packges.

XL32F001 is not. Its equivalence is PY32F002B

Thanks for your correction!

Also, I have a question, I have read your blogs, py32f002a is actually 32KF 4KR. But py32f030 has 64KF 8KR products, I am a little curious about how it can achieve this limit, is there two dies in py32f030? (An additional flash and rom die, an m0 core with 32KF,4KR die)

Or use physical fuses or in-package shorting? If so, why not use the same technique in 002A?

IOsetting commented 7 months ago

Sorry, that is beyond my knowledge. : |