Author Topic: $0.25 HK32F030M - Cortex-M0, 32MHz, 16KB flash, 2KB RAM (Actually 4KB!)  (Read 20226 times)

0 Members and 1 Guest are viewing this topic.

Offline DavidAlfaTopic starter

  • Super Contributor
  • ***
  • Posts: 5914
  • Country: es
Heating slighly = 50°C aprox, more than ~108MHz was unstable.
200MHz didn't work at all, I just knew it was running at that speed by checking the MCO output.
Max realistic working speed was 96MHz, I blasted it with hot air and it kept working at burning temperatures.

You have a video in YouTube testing up to 7V, I don't think the chip is different.
You can see how the current quickly increases over 4V, first indication of "not made for 5V".
The current meter in that PSU seems unreliable, as the HK32F030M already consumes about 4mA at 3.3V, with nothing else.
That board has several leds, yet measures "0.000".
So it seems to me the current consumption at 5v is much higher than shown there.



No idea about supporting plataformio, neither I use it, I patched STM32 CubeIDE and use DIY J-Link.

Anyways my attention is now in the Puya PY32F002A :).
« Last Edit: June 23, 2023, 02:29:04 pm by DavidAlfa »
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 

Offline man_anyone

  • Newbie
  • Posts: 5
  • Country: my
Anyways my attention is now in the Puya PY32F002A :).

Are they overclockable too? Or is it a Hangshun only thing?
 

Offline DavidAlfaTopic starter

  • Super Contributor
  • ***
  • Posts: 5914
  • Country: es
Not tested by myself yet, still in transit, but they seem to overlock a bit, check the elektroda thread:
https://www.elektroda.com/rtvforum/topic3946116.html

The interesting thing here is the $0.11 they cost, overclockable or not  ;).
« Last Edit: June 24, 2023, 01:07:18 am by DavidAlfa »
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 

Offline true

  • Frequent Contributor
  • **
  • Posts: 329
  • Country: us
  • INTERNET
I notice the HK32F030 links have all ceased to work on lcsc ?

I know, wtf? I just got done porting an XMODEM bootloader for this, and now they're gone from LCSC... the company isn't listed on LCSC anymore either...


No idea about supporting plataformio, neither I use it, I patched STM32 CubeIDE and use DIY J-Link.
I may work on platformio support after August. If somone beats me to it, great. Until then, I am using your method.

Are you able to update your DIY J-Link or do you have to click No every time you debug?


Anyways my attention is now in the Puya PY32F002A :).
As with others who like to tinker and play with these, I suspect.
 

Offline DavidAlfaTopic starter

  • Super Contributor
  • ***
  • Posts: 5914
  • Country: es
I got rid of the update message by editing the firmware, changing the string near 0x4000 where it says "Compiled... 2018", setting the year to the future.
I set 2028 and it never asked again  :).
« Last Edit: June 25, 2023, 11:48:56 am by DavidAlfa »
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 

Offline true

  • Frequent Contributor
  • **
  • Posts: 329
  • Country: us
  • INTERNET
Re: the year edit, yeah I figured that out right after posting. Seems to work fine. It's not the most up to date, but not sure that matters.

I am having an issue with the SPI peripheral. I cannot operate it in master mode. In SPI1->CR1, If SPE is set high, MSTR will go low automatically. This is even without code running, purely by poking the register. I get no transfer. Any ideas? **edit** SSM and SSI flags both need to be set high. That solves the problem.
« Last Edit: June 26, 2023, 05:38:51 am by true »
 

Offline DavidAlfaTopic starter

  • Super Contributor
  • ***
  • Posts: 5914
  • Country: es
I had no problem with SPI, but I used the peripheral library.
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 

Offline boneDragon

  • Contributor
  • Posts: 24
why not use 0.2..0.3$ more expensive chip like GD32E230/AT32F421/N32Gxxx with faster core/clock, more flash/ram/timers etc, available from more sellers, and its pinout compatible with STM32F0xx/3xx, so you can switch to other if it is not available ? Peripherals are mostly compatible, so porting to other chip is easy
« Last Edit: June 26, 2023, 12:05:04 pm by boneDragon »
 

Offline DavidAlfaTopic starter

  • Super Contributor
  • ***
  • Posts: 5914
  • Country: es
Because I simply wanted to try the cheapest arm mcu I found back then ;)
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 

Offline DavidAlfaTopic starter

  • Super Contributor
  • ***
  • Posts: 5914
  • Country: es
The board arrived, still waiting for the parts from lcsc.
It's really small! Of course banana for scale  :)

The silk screen text is too small for the fab resolution...
« Last Edit: June 26, 2023, 10:28:43 pm by DavidAlfa »
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 

Offline DavidAlfaTopic starter

  • Super Contributor
  • ***
  • Posts: 5914
  • Country: es
Deeper detail:
« Last Edit: June 26, 2023, 10:29:22 pm by DavidAlfa »
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 

Offline boneDragon

  • Contributor
  • Posts: 24
comparative table of some mcus:
« Last Edit: July 01, 2023, 06:20:15 am by boneDragon »
 

Offline IOsetting

  • Regular Contributor
  • *
  • Posts: 56
  • Country: cn
There is another variant(possibly just the same) of py32f002a, with Arduino support, will be released by Luatos. They guarantee the ram&flash size to be 4KB/32KB.

Arduino lib: https://github.com/Air-duino/Arduino-AirMCU
Tutorial: https://wiki.luatos.com/chips/air001/Air001-Arduino.html  (in Chinese, please use Google Chrome to translate it)

The PCB files of this board: https://gitee.com/openLuat/luatos-broads/tree/master/broads/Air001-Board/
 

Offline DavidAlfaTopic starter

  • Super Contributor
  • ***
  • Posts: 5914
  • Country: es
Yes the py32F002a has 4/32KB, though not officially.
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 

Offline DavidAlfaTopic starter

  • Super Contributor
  • ***
  • Posts: 5914
  • Country: es
Did you remember to thoroughly check the netlist and schematics before ordering?
Aye!
Well...  :-DD

« Last Edit: July 15, 2023, 07:10:23 pm by DavidAlfa »
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 

Offline bingo600

  • Super Contributor
  • ***
  • Posts: 1989
  • Country: dk
I just ordered a few of these - TWen32F003
Initially i thought them to be RiscV, but i think the TWen32F003  is Arm Cortex.

I haven't succeded in getting any info on this MCU, not even a DS.
Anyone has it ??

/Bingo
« Last Edit: July 02, 2023, 06:23:59 am by bingo600 »
 

Offline DavidAlfaTopic starter

  • Super Contributor
  • ***
  • Posts: 5914
  • Country: es
First step before buying anything is finding the docs!
If no docs or bad support, fly away!
But better you make a new thread for that MCU, doesn't belong here!
I will make a new thread for the PY32F002A when I start tinkering with - so should you with the Twen32 lol.

Anyways, didn't get the CH340 pin working as DTR for BOOT0 so I disconnected it and toggled manually.
Puya ISP worked beautifully, got the leds working in no time thanks to the existing example projects.
« Last Edit: July 01, 2023, 07:19:18 am by DavidAlfa »
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 
The following users thanked this post: PCB.Wiz

Offline bingo600

  • Super Contributor
  • ***
  • Posts: 1989
  • Country: dk
I will make a new thread for the PY32F002A when I start tinkering with - so should you with the Twen32 lol.

Roger that on the TWen32F003

May i ask why you didn't select the PY32F003 either in 6 (32K/4K) or 8 (64K/8K) - F003 is dual uart too
They even seem cheaper at LCSC.

Would you consider making a board for the F003 ...
I am "lousy" at PCB's


Puta ISP worked beautifully, gotcthe leds working in no time thanks to the existing example projects.
Do you have a link for that PUYA ISP ?
Does it run under linux ?

/Bingo
 

Offline DavidAlfaTopic starter

  • Super Contributor
  • ***
  • Posts: 5914
  • Country: es
Would you consider making a board for the F003 ...
Actually the PY32F002 is the same. 2x SPI, 2x UART, PLL (48MHz), 4/32KB ... a great deal for 11 cents!
Otherwise, I'm not interested in the PY32F003/PY32F030, I can get a STM32 for a similar price.

Edit: PY32F002 stuff moved here:
https://www.eevblog.com/forum/microcontrollers/$0-11-py32f002a-m0-24mhz-320kb-actually-324kb-more-peripherals/
« Last Edit: July 04, 2023, 06:12:34 pm by DavidAlfa »
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 
The following users thanked this post: bingo600

Offline DavidAlfaTopic starter

  • Super Contributor
  • ***
  • Posts: 5914
  • Country: es
Can you please test the HK32F030M on 5V?
I notice the HK32F030 links have all ceased to work on lcsc ?
Yeah, I noticed too! Also other parts I bough on my last order completely evaporated.
This is f** nuts, now I can't view the datasheet anymore!
Lesson learned: Download them before ordering!  |O
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 

Offline Sacodepatatas

  • Regular Contributor
  • *
  • Posts: 80
  • Country: es
I've found an interesting spreadsheet regarding the IO mapping of the HK32F030M so i attached the files for the joy of everybody.
 

Offline ass20

  • Contributor
  • Posts: 33
Re: $0.25 HK32F030M - Cortex-M0, 32MHz, 16KB flash, 2KB RAM (Actually 4KB!)
« Reply #96 on: January 25, 2024, 07:58:30 am »
hi

 I buy HK32F030Mf6 from ali
I solder mcu on pcb board and connect only capacitor to Vcc and gnd pin. and connect jlink-ob (072) to cpu over swd (swdio and swdclk lines only)
but jlink not found cpu. jlink version 7.82f and 7.94 without addons for hk32

I mesure I=1.3mA only


Add
 I found errors

Jlink-ob (072) work fine read and write data
If you do not erase or do not write RESET option bytes to default
I write following options bytes and after than works is fine

1FFF_F800   AA 55 FF 00 FF 00 FF 00  FF 00 FF 00 FF 00 FF 00

About hardware
minimal need I place only 1 capacitor 4.7uF to Vcc and Gnd pins only
« Last Edit: January 26, 2024, 11:26:36 am by ass20 »
 

Offline DavidAlfaTopic starter

  • Super Contributor
  • ***
  • Posts: 5914
  • Country: es
Re: $0.25 HK32F030M - Cortex-M0, 32MHz, 16KB flash, 2KB RAM (Actually 4KB!)
« Reply #97 on: January 26, 2024, 10:04:11 pm »
Connecting nRST might help.
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 

Offline ass20

  • Contributor
  • Posts: 33
Re: $0.25 HK32F030M - Cortex-M0, 32MHz, 16KB flash, 2KB RAM (Actually 4KB!)
« Reply #98 on: January 27, 2024, 08:36:58 am »
I found HK_config
https://www.hsxp-hk.com/companyfile/10/
It is have Eng interface and manuals inside

HK_config use jlink for flashing and have user frendly option bites menu
 
 

Offline prosper

  • Regular Contributor
  • *
  • Posts: 80
  • Country: ca
Re: $0.25 HK32F030M - Cortex-M0, 32MHz, 16KB flash, 2KB RAM (Actually 4KB!)
« Reply #99 on: February 08, 2024, 05:36:39 pm »
The only real issues were the f*** AWU EXTI line, and the f** AWU not working right away after programming (Requiring power cycling).

One was relatively easy, I already had read similar issues with other mcus not resetting all the periphery on reset signal, so I gave it a try... humm now AWU works!
The EXTI line was a different animal, I had to try every combination, tracing the issue, but in the end I got it!

Thanks for documenting your experiences on this. I ran into similar issues configuring EXTI on this, as well as resets not resetting peripherals properly and/or peripherals not behaving as their register values seem to indicate after a reset. Adding a 'periph_DeInit(...);' before the 'periph_Init(...);' seems to help. TIM1 suffers from this - it doesn't correctly initialize PWM polarity across resets. Sometimes you get noninverting polarity, sometimes it's inverted. Seems random, or at least related to whatever mode it was in before the reset. I'd assumed it was a power supply stability thing or maybe an oscillator stability thing, because adding a delay to system startup before enabling the peripheral clocks and bringing them up seemed to help.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf