Elektroda.com
Elektroda.com
X
This content has been translated flag-pl » flag-en View the original version here.
  • HK32F030M - Chinese ARM for 15 cents

    No, this is not another STM32F030 clone as the designation would suggest.
    It is a Cortex M0 with a pinout similar to the 8-bit STM8S microcontrollers.

    STM8S/HK32F030M/STM32F030:
    HK32F030M - Chinese ARM for 15 cents HK32F030M - Chinese ARM for 15 cents HK32F030M - Chinese ARM for 15 cents

    The HK32F030M has 16kB Flash, 2kB RAM and 448B EEPROM. SPI/I2C/USART/ADC present.
    There is no DMA, PLL, or external quartz support, which is present in the STM32F030. The Chinese manufacturer added BEEPER appearing in STM8S.
    We only have 3 timers. Two with PWM and one only internal. All 16 bit.
    The internal HSI generator runs at 32MHz.
    For 15 cents in detail? There is no competition.

    HK32F030M/STM32F030:
    HK32F030M - Chinese ARM for 15 cents HK32F030M - Chinese ARM for 15 cents

    Peripheral addresses are similar. Unfortunately, the individual registers are slightly different, so the code from STM32F030 may not work properly without corrections.
    HK32F030M - Chinese ARM for 15 cents

    HK32F030M/STM32F030 clocks:
    HK32F030M - Chinese ARM for 15 cents HK32F030M - Chinese ARM for 15 cents

    J-Link does not support "out of the box" microcontroller. You need to edit the "JLinkDevices.xml" file and add the following entries:
    Quote:
    <!-- -->
    <!-- HK -->
    <!-- -->
    <Device>
    <ChipInfo Vendor="ST" Name="HK32F030M" WorkRAMAddr="0x20000000" WorkRAMSize="0x800" Core="JLINK_CORE_CORTEX_M0" />
    <FlashBankInfo Name="Code Flash" BaseAddr="0x08000000" MaxSize="0x4000" Loader="Devices/HK32F030M/HK32F030MXX_16.FLM" LoaderType="FLASH_ALGO_TYPE_CMSIS" />
    </Device>
    <Device>
    <ChipInfo Vendor="ST" Name="HK32F030M" WorkRAMAddr="0x20000000" WorkRAMSize="0x800" Core="JLINK_CORE_CORTEX_M0" />
    <FlashBankInfo Name="Code EEPROM" BaseAddr="0x0C000000" MaxSize="0x01C0" Loader="Devices/HK32F030M/HK32F030MXX_EEPROM.FLM" LoaderType="FLASH_ALGO_TYPE_CMSIS" />
    </Device>
    <Device>
    <ChipInfo Vendor="ST" Name="HK32F030M" WorkRAMAddr="0x20000000" WorkRAMSize="0x800" Core="JLINK_CORE_CORTEX_M0" />
    <FlashBankInfo Name="Code OPT" BaseAddr="0x1FFFF800" MaxSize="0x0018" Loader="Devices/HK32F030M/HK32F030MXX_OPT.FLM" LoaderType="FLASH_ALGO_TYPE_CMSIS" />
    </Device>

    And upload ".FLM" files (attached).
    "Vendor=ST" so that the system can be programmed with ST-Link converted to J-Link ;)

    What more can I say? For now, not much except that the microcontroller works. :)
    If I discover something new, I will add it.

    "Hello world" and flashing LEDs in the attachment. Just in time to start.
    LED1...4 = PC4...7
    UART TX = PA3, speed 9600

    HK32F030M - Chinese ARM for 15 cents




    Cool? Ranking DIY
    About Author
    piotr_go
    DIY electronics designer
    Offline 
    piotr_go wrote 2595 posts with rating 2866, helped 88 times. Been with us since 2003 year.
  • #2
    khoam
    Level 42  
    piotr_go wrote:
    For 60 groszy in detail? There is no competition.

    I wonder if the manufacturer fires the license fee to ARM :)
  • #3
    piotr_go
    DIY electronics designer
    PDFs are not top secret, so I think they have a license.
    ARM abolished the entry fee for M0 and M3, they only charge on the produced pcs.
    (supposedly 1%, I haven't found official confirmation)
  • #4
    mariomario
    Level 18  
    The link to the store and the shipping price are missing ;)
  • #5
    victoriii
    Level 19  
    Link to the store Personally, I recommend this store - it's cheap, a lot of cheap Chinese chips and I've never come across fakes.
  • #6
    piotr_go
    DIY electronics designer
    I was hoping for some interesting discussion...

    Why are the prices of Western microcontrollers so high? It's not a hand job.
    PIC10F200 - price 3 times higher. PICs are like 40 years old, it's not the pinnacle of technology. Patents expired, no cost to design.
    Collusion?
  • #7
    khoam
    Level 42  
    piotr_go wrote:
    I was hoping for some interesting discussion...

    Sorry, but I did not find information about Arduino Core support for this processor :)

    piotr_go wrote:
    PIC10F200 - price 3 times higher. PICs are like 40 years old, it's not the pinnacle of technology.

    Inter-corporate agreements, additional benefits, etc. On the other hand, it is as if you wonder why many ATMs still use Windows XP today ;)
  • #8
    victoriii
    Level 19  
    Well, it depends where you buy. Exactly the same STM32 as in LCSC in Farnell is 3-4 times more expensive. I believe this is due to higher wages in the UK and Farnell's inflated costs. I wonder what the price level would be if you went directly to Microchip and expressed your willingness to buy 2 million units.
  • #9
    willyvmm
    Level 30  
    The first thing the NDA orders.
  • #10
    piotr_go
    DIY electronics designer
    khoam wrote:
    Sorry, but I did not find information about Arduino Core support for this processor :)

    Haha, well...

    victoriii wrote:
    I wonder what the price level would be if you went directly to Microchip and expressed your willingness to buy 2 million units.

    I wonder what price the Chinese would offer me at 2 million, because I can't complain about the prices for single pieces.

    willyvmm wrote:
    The first thing the NDA orders.

    And I'm not boasting about the discount anymore :(
  • #11
    victoriii
    Level 19  
    I don't think the Chinese have anything to do with it. Instead of 2p/pc (PADAUK) you will get 1.5p/pc ;)
  • #12
    piotr_go
    DIY electronics designer
    victoriii wrote:
    Instead of 2p/pc (PADAUK) you will get 1.5p/pc

    The 2 cent one is not the cheapest Padauk. There is also PMS15A.
    Apparently, with a large amount at the manufacturer, they are $0.01 each.

    And you can always order "bare die".


  • #13
    m7m
    Level 12  
    piotr_go wrote:
    I was hoping for some interesting discussion...

    Why are the prices of Western microcontrollers so high? It's not a hand job.
    PIC10F200 - price 3 times higher. PICs are like 40 years old, it's not the pinnacle of technology. Patents expired, no cost to design.
    Collusion?


    Hello.
    Prices - well, no competition....
    We'll wait and see how it is with parameters, stability, life time.
    "Western" products work quite well even if you buy regular versions, not any "military".
    If it turns out that there is no difference, why overpay?
    best regards.
  • #14
    Anonymous
    Level 1  
  • #15
    piotr_go
    DIY electronics designer
    agent.007 wrote:
    Only the simplest ones. Others cost the same or usually more expensive.

    Maybe ST has some production there? Or they are in arrears because they imported too much and Chinese equivalents appeared.

    agent.007 wrote:
    probably chinese copies

    Chinese versions of PICs have 4 cents in LCSC.
    The original is there too, ~35 cents each.

    Prices in Farnel ... well ... fake resistors or goldpins where they sell cheaper?
    It seems to me that some distributors have set such prices because they simply want to discourage hobbyists so that "D" doesn't bother them.
  • #16
    squeze
    Level 13  
    piotr_go wrote:
    I was hoping for some interesting discussion...
    Why are the prices of Western microcontrollers so high?


    Western behemoths are maintainable, but at this price there is also a tool that they often provide for free, not to mention the documentation (EN) :)

    In addition to the DS itself, they also release application notes, etc.

    In the case of this product, the price is nice on paper too, but so what if everything is in the bushes. I myself sometimes read DS several times and then errata to make something work. And how to read DS if only in Chinese? :)


    And by the way ... according to DS which piece you showed (memory map) then FLASH starts from the address 0x0 to 0x00003FFF, while in the jlinkdevices file you enter BaseAddr="0x08000000" ?
  • #17
    piotr_go
    DIY electronics designer
    squeze wrote:
    And by the way ... according to DS which piece you showed (memory map) then FLASH starts from the address 0x0 to 0x00003FFF, while in the jlinkdevices file you enter BaseAddr="0x08000000" ?

    That's right. Flash is seen at addresses 0x0800xxxx and 0x0000xxxx.
    0x0000xxxx booting, 0x0800xxxx programming.
    In STM32 under 0x0000xxxx RAM/FLASH/ROM is switched. There is probably only FLASH here for compatibility.

    squeze wrote:
    And how to read DS if only in Chinese?

    A simple process. Knowledge of STM32 + translator is enough.
  • #18
    Anonymous
    Level 1  
  • #19
    piotr_go
    DIY electronics designer
    agent.007 wrote:
    Fanell, Arrow and others just liked hobbyists

    Only when I once wanted to buy r-PI, they told me to look elsewhere, because they only sell to companies.

    agent.007 wrote:
    it cannot be used with Arduino

    Did someone ban it?

    agent.007 wrote:
    for a hobbyist, what does it matter if he pays 60gr or 3 zlotys for a procek?

    You can see that he has a lot of different crap on aliexpress with the note "arduino".
    Lots of cheap clones of all sorts of modules. It is too

    agent.007 wrote:
    After all, Chinese FLASH or uK are known for a long time, which last for 6 months and then can no longer be programmed.

    I haven't encountered anything like this.
    If anything, it's usually "painting", a plague with older systems.
    They can stamp the date 20 years after the end of production :D
    Or sold as new.
  • #20
    Anonymous
    Level 1  
  • #21
    piotr_go
    DIY electronics designer
    agent.007 wrote:
    those who only need Arduino won't write the libraries themselves. Their absence greatly limits the number of hobbyists.

    There will probably be someone who will adapt the code from stm32f030. The differences are not big.
    I just don't know how flash programming looks like, I don't use arduino.
    Any bootloader? Probably pointless, there is no USB.
  • #22
    khoam
    Level 42  
    piotr_go wrote:
    I just don't know how flash programming looks like, I don't use arduino. Any bootloader? Probably pointless, there is no USB.

    It just needs a UART.
  • #23
    piotr_go
    DIY electronics designer
    khoam wrote:
    It just needs a UART.

    Since both (uart/programmer) need to be connected, isn't it better to use the programmer right away?

    The bootloader can be done as much as possible, I will probably write some myself out of boredom. (xmodem?, there will be more in the collection)
    The Chinese even added interrupt remapping, which the M0 doesn't have. So you can without wasting RAM.
  • #24
    khoam
    Level 42  
    piotr_go wrote:
    Since both (uart/programmer) need to be connected, isn't it better to use the programmer right away?

    Sure you can. The bootloader is not "mandatory". What is important, however, is the implementation of the framework Arduino Core (this is the minimum version).
  • #27
    NegativeFeedback
    Level 14  
    piotr_go wrote:
    NegativeFeedback wrote:
    Complete...

    99% of the information does not apply to this system.


    Depends on your point of view, because 99% of it applies to me.
  • #28
    piotr_go
    DIY electronics designer
    NegativeFeedback wrote:
    Depends on your point of view, because 99% of it applies to me.

    RTOS, network, USB, memory protection and all the rest?
    Looks like Google translated the Chinese PDFs differently for me.
  • #29
    victoriii
    Level 19  
    I was tempted yesterday and bought myself 10, I'll see how much it's worth.
  • #30
    piotr_go
    DIY electronics designer
    You've spent it :)

    I was able to contact the manufacturer. I asked about the prices of HK32F0301M (48MHz and 2x more ram).
    They wrote to me that it costs the same as HK32F030M (which surprised me a bit).
    Both are 15 cents for 1000 units, but due to the fact that they are not making it with the production (too many people are willing), they have to raise the price to 20 cents.

    By the way, I spotted "HC32F005" - 32kB flash, 4kB ram, similar pinout, price a bit higher, but it's 5V.
    I ordered some for testing.
    From what I can see from the dates in the PDF, this is not new.