Author Topic: CFW for KSGER/Quicko STM32 Soldering Stations  (Read 655269 times)

Vital, Tugo and 3 Guests are viewing this topic.

Offline ygi

  • Regular Contributor
  • *
  • Posts: 202
  • Country: be
Re: CFW for KSGER/Quicko STM32 Soldering Stations
« Reply #3200 on: November 08, 2022, 06:07:00 pm »
David, I'm  trying to build the current master the usual* way but I'm hitting a brick wall for some reason. After opening the .ioc file, whenever I run the "Device configuration tool code generation", it just deletes all files leaving only an empty Drivers/CMSIS subfolder within the root directory. I also tried the old method of saving .ioc file with the same result.

I'm trying to figure out whether it's related to the recent changes ( https://github.com/deividAlfa/stm32_soldering_iron_controller/commit/e3c76e33704b86c69e8d5ccc87f81b639c81c648 ), new CubeMX version somehow changing something (updated from 1.9.0 to 1.10.1) or something else entirely. Also CubeMX doesn't log anything, it all happens in the background. Any thought?

Building for Ksger v1.5 board with standard SD1306 OLED.

*by that I mean your old manual way that worked for me a hundred times before.
 

Offline Spenoza

  • Newbie
  • Posts: 8
  • Country: by
Re: CFW for KSGER/Quicko STM32 Soldering Stations
« Reply #3201 on: November 08, 2022, 06:09:53 pm »
Understood. Thanks. Well, I'm not that inexperienced in programming...
It's just that there are quite a lot of different structures piled up there to immediately understand the entire hierarchy.
For example, that a screen is created, elements widgets are added to it, and so on.
Well, I'll figure it out slowly.
Is this a self-written gui or is there something similar with usage examples?
 

Offline Spenoza

  • Newbie
  • Posts: 8
  • Country: by
Re: CFW for KSGER/Quicko STM32 Soldering Stations
« Reply #3202 on: November 08, 2022, 06:22:31 pm »
It seems there was information about problems when migrating from old CubeMX.
I now used CubeIDE 1.10.1 and CubeMX 6.6.1 without problems
But at startup CubeMX, I did not do the migration, but left the old version (press continue)

 

Offline samplerax

  • Newbie
  • Posts: 1
  • Country: lt
Re: CFW for KSGER/Quicko STM32 Soldering Stations
« Reply #3203 on: November 08, 2022, 10:42:14 pm »
I can't seem to find how a tip change is covered. Any problems with "hot swapping" C245/C210 carts? I have original JBC AD-SF stand with separate holder-post and change-post wire outputs. Sleep/Standby works fine when triggered from holder-post with "Stand mode", now I'm wondering if there is something similar to detect tool change when change-post is touched?
 

Online DavidAlfa

  • Super Contributor
  • ***
  • Posts: 5890
  • Country: es
Re: CFW for KSGER/Quicko STM32 Soldering Stations
« Reply #3204 on: November 09, 2022, 02:00:13 am »
Try using the Build script to generate the code or compile, works straight away.
There's no reason to do it manually, importing the projects, etc...
Also check your java version, open a CMD window and type "java -version", should be 12...15, newer like 17 and 19 won't work, the IDE will drop hundreds of errors.

Running CubeMX within the IDE seems to break it, haven't looked much, but apparently it's not liking the different profiles, and in some cases overriding the linker script completely.
I just noticed this in the diff. Hmm suspicious.
Code: [Select]
- ProjectManager.TargetToolchain=STM32CubeIDE
+ ProjectManager.TargetToolchain=EWARM V8.32
I upgraded the ioc files using the script, not inside the IDE, that could be the culprit.
Will make some testing tomorrow.


Spenoza, sorry no docs, it's custom, tried to keep it tidy and well commented but that's all.
It also took me a while to figure out when forking PTdreamer's code.
« Last Edit: November 09, 2022, 02:16:19 am by DavidAlfa »
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 

Offline ygi

  • Regular Contributor
  • *
  • Posts: 202
  • Country: be
Re: CFW for KSGER/Quicko STM32 Soldering Stations
« Reply #3205 on: November 09, 2022, 12:22:12 pm »
Thanks for looking into it David. BTW, if the problem's on my side and don't affect other people, don't waste your time on it I'm sure you've got more interesting things to do. ;)

Regarding the script, considering I run powershell as default command interpreter, the fact that cubeMX is in "program files" (which the script most likely can't access cause it's a system folder) and that I also replace a couple files manually anyway, it just didn't make sens for me. For the sake of testing, I did try the script in cmd, ran it as admin and even set the correct path in the script but it won't launch cubeMX and stops there. No big deal anyway.
JRE version is 1.8.0. Unless the CubeMX updater installed that version, it should be the same one that worked fine until now.

I tried changing the suspicious line in the ioc file, still no joy.
 

Online DavidAlfa

  • Super Contributor
  • ***
  • Posts: 5890
  • Country: es
Re: CFW for KSGER/Quicko STM32 Soldering Stations
« Reply #3206 on: November 09, 2022, 03:18:44 pm »
So for some reason calling CubeMX externally isn't behaving in the same way as before.
If you chose "only copy files" it would as expected, it was the generation causing the issue.
After generation using the script, these lines are changing:
Code: [Select]
ProjectManager.TargetToolchain=STM32CubeIDE
ProjectManager.UnderRoot=true
To:
Code: [Select]
ProjectManager.TargetToolchain=EWARM V8.32
ProjectManager.UnderRoot=false

Building within the script will work perfectly, the issue will happen in CubeIDE.
After that, opening the ioc in CubeIDE and regenerating the code will completely mess the project up (Creating like 10 Release/Debug configurations, wtf) and placing the generated files under "Application" folder.
Trying to revert the mess regenerating with a good ioc wouldn't fix it, it was too late!

The big issue happened when I upgraded the ioc files to the new MX version, then committed broken files.

Everything fixed, check the commit details.
« Last Edit: November 09, 2022, 07:27:13 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: dcore, ygi

Offline ygi

  • Regular Contributor
  • *
  • Posts: 202
  • Country: be
Re: CFW for KSGER/Quicko STM32 Soldering Stations
« Reply #3207 on: November 09, 2022, 07:17:29 pm »
Yep, you nailed it! I can also confirm that JRE 1.8 works without any error or warning.
Now just tick the checkbox to generates the .bin formatted file and it'll be perfect (yeah, I know, lazy users always complaining about something...)  ^-^

Cheers man.
 

Online DavidAlfa

  • Super Contributor
  • ***
  • Posts: 5890
  • Country: es
Re: CFW for KSGER/Quicko STM32 Soldering Stations
« Reply #3208 on: November 09, 2022, 07:25:10 pm »
I had to reset the project several times until I found the issue, checked the hex & bin boxes every single time, well, except in the last one  :palm:
In fact now you said it, I noticed the bin files were missing after an automated build, but it took me a while to put everything together and later forgot about Ii.
Edit: Fixed.
« Last Edit: November 09, 2022, 09:06:00 pm by DavidAlfa »
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 

Offline it9exm

  • Newbie
  • Posts: 2
  • Country: it
Re: CFW for KSGER/Quicko STM32 Soldering Stations
« Reply #3209 on: November 29, 2022, 02:04:49 pm »
Hi,
I recently bought a Queeco T12-959, just checked inside and found an XM1008K6T6 instead of an STC, still not supported due to flash memory constraints.
Any ideas to replace that with a regular STM32F103C8T6? May be worth to design a new PCB? What are the benefits of the custom firmware?
 

Offline illiac4

  • Regular Contributor
  • *
  • Posts: 57
  • Country: si
Re: CFW for KSGER/Quicko STM32 Soldering Stations
« Reply #3210 on: December 01, 2022, 05:13:41 am »
 

Offline Bob Sava

  • Regular Contributor
  • *
  • Posts: 98
  • Country: us
Re: CFW for KSGER/Quicko STM32 Soldering Stations
« Reply #3211 on: December 03, 2022, 02:38:00 am »
Hi,
I recently bought a Queeco T12-959, just checked inside and found an XM1008K6T6 instead of an STC, still not supported due to flash memory constraints.
Any ideas to replace that with a regular STM32F103C8T6? May be worth to design a new PCB? What are the benefits of the custom firmware?

Maybe it's using external flash IC since 32k is quite small.

Regarding DavidAlfa's firmware: is it possible to configure it to turn heat off with a press of a button or some other action (other than timeout)?

« Last Edit: December 03, 2022, 02:40:04 am by Bob Sava »
 

Online DavidAlfa

  • Super Contributor
  • ***
  • Posts: 5890
  • Country: es
Re: CFW for KSGER/Quicko STM32 Soldering Stations
« Reply #3212 on: December 03, 2022, 04:41:33 am »
Any ideas to replace that with a regular STM32F103C8T6?
No. STC boards are completely different.
Hi,
I recently bought a Queeco T12-959, just checked inside and found an XM1008K6T6 instead of an STC, still not supported due to flash memory constraints.
Any ideas to replace that with a regular STM32F103C8T6? May be worth to design a new PCB? What are the benefits of the custom firmware?
Regarding DavidAlfa's firmware: is it possible to configure it to turn heat off with a press of a button or some other action (other than timeout)?
Don't be lazy and read the MANUAL.
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 
The following users thanked this post: Bob Sava

Offline stanley_bra

  • Newbie
  • Posts: 1
  • Country: br
Re: CFW for KSGER/Quicko STM32 Soldering Stations
« Reply #3213 on: December 03, 2022, 03:33:46 pm »
Hi everybody. I bought the Quecoo T12-958 soldering station on Aliexpress. Processor is MM32SPIN27. It arrived with tip J02 activated. I don't have tip J02 I tried to disable it but I can't. Has anyone had this problem ?
 

Offline Bob Sava

  • Regular Contributor
  • *
  • Posts: 98
  • Country: us
Re: CFW for KSGER/Quicko STM32 Soldering Stations
« Reply #3214 on: December 03, 2022, 04:10:25 pm »
Thank you for great firmware.  Have you considered XORing temperature digits with temperature graph?  I'm curious if there are perhaps technical limitations for not doing so.

Btw, I have T-12 955 model (latest fw) and selection of Boost/Sleep/Standby does not work reliably (or how I imagine it should):
Boost cannot be selected by click-turn, only by click within one second of temp selection.
Sometimes I can get to Sleep, sometimes selection stops at Standby, continuing rotation does nothing.
If it stops at Standby, sometimes I can press-turn again to get to Sleep, sometimes that does not work.
 

Online DavidAlfa

  • Super Contributor
  • ***
  • Posts: 5890
  • Country: es
Re: CFW for KSGER/Quicko STM32 Soldering Stations
« Reply #3215 on: December 03, 2022, 05:59:56 pm »
If you're talking about the CFW, making those questions it seems your didn't read the manual?
Controls have nothing to do with Ksger.
Boost can be only selected that way, rotate (temp shows up) and click.
Low power modes are entered by making click-and-rotate-counterwise.
Please read the manual, I could understand those questions if it was written in Chinese, but it's English, so what's the excuse?
Read the Operation manual, then make questions if you don't find it there.

Yes I tried xor'ing it long time ago, it was weird (Check attached picture).
It's a 128x64 oled, don't ask for miracles!
« Last Edit: December 05, 2022, 12:29:49 am by DavidAlfa »
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 

Offline Bob Sava

  • Regular Contributor
  • *
  • Posts: 98
  • Country: us
Re: CFW for KSGER/Quicko STM32 Soldering Stations
« Reply #3216 on: December 03, 2022, 07:25:18 pm »
This is what manual says:

Sleep/Standby modes
You can manually enter lower power modes by clicking and rotating counter-clockwise.
The sequence would be [run/boost mode]->[standby mode]->[sleep mode].

The way I understood the above:
1st detent: boost mode
2nd detent: standby
3rd detent: sleep

Based on your reply, sounds as first state is the starting point not a function accessed by click-rotate.  The issue reaching standby or sleep reliably is how I described in my previous post (tl;dr standby is not selected on 1st detent and sleep on the 2nd).



« Last Edit: December 03, 2022, 07:31:17 pm by Bob Sava »
 

Offline ygi

  • Regular Contributor
  • *
  • Posts: 202
  • Country: be
Re: CFW for KSGER/Quicko STM32 Soldering Stations
« Reply #3217 on: December 03, 2022, 08:01:23 pm »
Then there an error in the manual. I believe David changed the behavior at some point to accommodate for more actions and features. That line in the manual must be a relic of the past. :)

The way it currently works is:
- click and rotate 1 or 2 ticks counter-clockwise for standby then sleep.
- rotate 1 tick in any direction to highlight t° and then click while still highlighted for boost.
- click and rotate clockwise to highlight tip selector and select by turning the encoder clockwise/counterclockwise.
      * While tip selector is highlighted, long press for more than 2sec to edit selected tip.
- long press for more than 2 sec to enter config menu.
 

Online DavidAlfa

  • Super Contributor
  • ***
  • Posts: 5890
  • Country: es
Re: CFW for KSGER/Quicko STM32 Soldering Stations
« Reply #3218 on: December 03, 2022, 08:13:09 pm »
I agree, it's not entirely clear...

How about this? Will update the Readme soon.
Quote
For some actions you might be instructed to issue a Drag rotation.
This means clicking the button (Helding down) and rotating at the same time.


The time between pressing and rotating must be short, i.e. don't keep the button down for two seconds before rotating, doesn't need to be blazing fast either, just done in a natural way.
After a drag-rotation was detected, release the button and use the encoder normally (Don't keep pressing to move, etc).

**Sleep/Standby modes**
You can manually enter lower power modes by making a counter-clockwise drag-rotation.

**Tip selection**
   Issue a clockwise drag-rotation to show the tip selection. The tip name label will be highlighted.
« Last Edit: December 03, 2022, 08:15:22 pm by DavidAlfa »
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 

Online DavidAlfa

  • Super Contributor
  • ***
  • Posts: 5890
  • Country: es
Re: CFW for KSGER/Quicko STM32 Soldering Stations
« Reply #3219 on: December 03, 2022, 09:12:06 pm »
Huh, I accidentally overwrote the whole repository because my local version was older!
After some hard sweating moments, everything was recovered back to its original state.

Updated the Operation manual showing these changes.
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 

Offline ygi

  • Regular Contributor
  • *
  • Posts: 202
  • Country: be
Re: CFW for KSGER/Quicko STM32 Soldering Stations
« Reply #3220 on: December 03, 2022, 09:58:34 pm »
I agree, it's not entirely clear...

How about this? Will update the Readme soon.
Quote
For some actions you might be instructed to issue a Drag rotation.
This means clicking the button (Helding down) and rotating at the same time.


The time between pressing and rotating must be short, i.e. don't keep the button down for two seconds before rotating, doesn't need to be blazing fast either, just done in a natural way.
After a drag-rotation was detected, release the button and use the encoder normally (Don't keep pressing to move, etc).

**Sleep/Standby modes**
You can manually enter lower power modes by making a counter-clockwise drag-rotation.

**Tip selection**
   Issue a clockwise drag-rotation to show the tip selection. The tip name label will be highlighted.

Looks fine to me. Maybe a native English speaker could suggest a more natural or preexisting wording for "drag-rotation"?
 

Online DavidAlfa

  • Super Contributor
  • ***
  • Posts: 5890
  • Country: es
Re: CFW for KSGER/Quicko STM32 Soldering Stations
« Reply #3221 on: December 03, 2022, 10:19:02 pm »
Forgot my A+++ Oxford degree, what really matters is the mechanics being easy to understand  ;)
« Last Edit: December 03, 2022, 10:21:06 pm by DavidAlfa »
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 

Online DavidAlfa

  • Super Contributor
  • ***
  • Posts: 5890
  • Country: es
Re: CFW for KSGER/Quicko STM32 Soldering Stations
« Reply #3222 on: December 04, 2022, 01:44:06 pm »
@KocsisV You owe me a truck full of beer for this! (A little ranting) :horse:

This is why I'm reluctant to accept huge commits from 3rd parties...
The theory says it should be error-free, but there'll always be some bugs, people will fly away leaving your project broken, and you'll be the only one fixing it, which will be 5x harder because you didn't made the changes.


Spot the error:
Code: (Bugged) [Select]
// Ensure flash was erased
  for (uint32_t i = 0u; i < (numPages * FLASH_PAGE_SIZE / sizeof(int32_t)); i++) {
    if( *((uint32_t*)(pageAddress + i)) != 0xFFFFFFFF){
      Flash_error();
    }
  }

Code: (Working) [Select]
// Ensure flash was erased
  for (uint32_t i = 0u; i < (numPages * FLASH_PAGE_SIZE / sizeof(int32_t)); i++) {
    if( *((uint32_t*)pageAddress + i) != 0xFFFFFFFF){
      Flash_error();
    }
  }


The difference is subtle, almost evil!
Code: (Bugged) [Select]
((uint32_t*)(pageAddress + i))Casts a uint32_t pointer to (pageAddress+i). When i=1...3, it will cause misaligned access.

Code: (Working) [Select]
((uint32_t*)pageAddress + i)Casts a uint32_t pointer to pageAddress, then increase increase the pointer by "i" times 32-bit, so each "i" increases the pointer by 4bytes.



The reason it didn't crash in Cortex-M3 (STM32F10x) is because it seems to support unaligned access, but Cortex-M0 clearly doesn't!
Neither was the code checking what it was suppossed to, it worked by pure luck  :-DD.


New builds available, Quicko F072 is working again.
Re-checked the projects, some were wrong (CubeIDE mixed some flags) or lacked binary outputs, fixed everything.
« Last Edit: December 05, 2022, 12:32:22 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: dcore

Offline illiac4

  • Regular Contributor
  • *
  • Posts: 57
  • Country: si
Re: CFW for KSGER/Quicko STM32 Soldering Stations
« Reply #3223 on: December 06, 2022, 05:47:33 am »
Hi. One question regarding Display brightness.
I have tested Handskit soldering station and the display brightness is much less bright then on Ksger. In fact it does not show any increasement in brightness after number 6.
It is a 4 pin display SSD1306 and have flashed v2 version on it. Is there anything it can be done to increase the brightness or is this just as the display is?

TNX
 

Online DavidAlfa

  • Super Contributor
  • ***
  • Posts: 5890
  • Country: es
Re: CFW for KSGER/Quicko STM32 Soldering Stations
« Reply #3224 on: December 06, 2022, 01:54:36 pm »
I think it's due the specific SSH106 display initialization it uses. I might make a special build for it, but first I need you feedback.
Is your display the 0.96" version or the 1.3?
Try this HW2.0 / HW2.0S / HW2.1S firmwares, which work/doesn't, which are brighter/dimmer?

Took a moment to reverse-engineer the original 1.3" v2.1S firmware in Ghidra and extract the display initialization, clearly it's executing the SH1106 charge pump command.
I recall this broke compatibility with some displays, I think it was the SSD1309? So the command was removed.
Code: [Select]
void SSD1306_init(void){
    SSD1306_start_write();
    i2c_Send_Byte(0);         // Write Cmd
    i2c_Send_Byte(0xae);      // Display off
    i2c_Send_Byte(0);         // c_col_H
    i2c_Send_Byte(0x10);      // c_col_H
    i2c_Send_Byte(0x40);      // c_start_line
    i2c_Send_Byte(0xb0);      // c_page
    i2c_Send_Byte(0x81);      // c_contrast
    i2c_Send_Byte(0xff);      // max contrast value
    i2c_Send_Byte(0xa1);      // c_remap_on
    i2c_Send_Byte(0xa6);      // c_inv_off
    i2c_Send_Byte(0xa8);      // c_mux_ratio
    i2c_Send_Byte(0x3f);      // mux ratio = 0x3F
    i2c_Send_Byte(0xad);      // c_pump_1106_set
    i2c_Send_Byte(0x8b);      // Enable pump
    i2c_Send_Byte(0x33);      // c_pump_1106_adj, 9V
    i2c_Send_Byte(0xc8);      // c_com_rev
    i2c_Send_Byte(0xd3);      // c_offset
    i2c_Send_Byte(0);         // offset =0
    i2c_Send_Byte(0xd5);      // c_clock_set
    i2c_Send_Byte(0x80);      // clock = 0x80
    i2c_Send_Byte(0xd9);      // c_precharge
    i2c_Send_Byte(0x1f);      // precharge = 0x1f
    i2c_Send_Byte(0xda);      // c_com_cfg
    i2c_Send_Byte(0x12);      // com_cfg = 0x12
    i2c_Send_Byte(0xdb);      // c_vcomh_lvl
    i2c_Send_Byte(0x40);      // level = 1 * Vref
    i2c_Send_Byte(0xaf);      // display on
    i2c_stop();
    SSD1306_fill_screen(0);
    SSD1306_set_cursor_position(0,0);
}
« Last Edit: December 06, 2022, 03:21:59 pm by DavidAlfa »
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf