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

illiac4, lfldp and 2 Guests are viewing this topic.

Offline TeamTeacup

  • Contributor
  • Posts: 17
  • Country: nl
Re: CFW for KSGER/Quicko STM32 Soldering Stations
« Reply #2400 on: December 01, 2021, 05:31:20 pm »
Here you go!
 

Offline DavidAlfa

  • Super Contributor
  • ***
  • Posts: 2767
  • Country: es
Re: CFW for KSGER/Quicko STM32 Soldering Stations
« Reply #2401 on: December 01, 2021, 05:38:50 pm »
It's empty!  :-DD
Check the video:
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 

Offline TeamTeacup

  • Contributor
  • Posts: 17
  • Country: nl
Re: CFW for KSGER/Quicko STM32 Soldering Stations
« Reply #2402 on: December 01, 2021, 06:02:29 pm »
Uh oh, my noobie side is showing! I'm completely confused with this and I'm not sure I'll make any headway with it. Might as well just stick with the original firmware for the time being.
 

Offline DavidAlfa

  • Super Contributor
  • ***
  • Posts: 2767
  • Country: es
Re: CFW for KSGER/Quicko STM32 Soldering Stations
« Reply #2403 on: December 01, 2021, 06:05:47 pm »
You're close! Just follow these 5 steps  ;)
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 

Offline TeamTeacup

  • Contributor
  • Posts: 17
  • Country: nl
Re: CFW for KSGER/Quicko STM32 Soldering Stations
« Reply #2404 on: December 01, 2021, 06:20:25 pm »
It proceeds to tell me that the build failed with several dozen errors  :wtf: Also has the pinout changed since the video was made or could this be another issue?
 

Offline DavidAlfa

  • Super Contributor
  • ***
  • Posts: 2767
  • Country: es
Re: CFW for KSGER/Quicko STM32 Soldering Stations
« Reply #2405 on: December 01, 2021, 06:32:18 pm »
The video shows the build process for my Quicko, of course the pinout it's different now you're building for Ksger.
That one is correct for Ksger v2.
With CubeMX opened (like your picture) click on the code generation button:

That will add everything needed, including the libraries, that's why you're getting the error.
« Last Edit: December 01, 2021, 06:36:19 pm by DavidAlfa »
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 

Offline ygi

  • Regular Contributor
  • *
  • Posts: 137
  • Country: be
Re: CFW for KSGER/Quicko STM32 Soldering Stations
« Reply #2406 on: December 01, 2021, 06:42:54 pm »
One thing I remember from the first time I set up cubeIDE that is not in the video: the root folder name where you extract the files must be "STM32SolderingStation" otherwise build will fail. I can see on your screenshot yours is auto named by your unzip program "stm32_soldering_iron_controller-master". Rename it and try again.
 

Offline TeamTeacup

  • Contributor
  • Posts: 17
  • Country: nl
Re: CFW for KSGER/Quicko STM32 Soldering Stations
« Reply #2407 on: December 01, 2021, 06:51:53 pm »
Thankyou to you both, I've been able to build from the source just fine. Though when I go to run/debug it I find it halts on the following line:

FillBuffer() at ssd1306.c:520 0x8014a44

  while(oled.status!=oled_idle);              // Don't write to buffer while screen buffer is being transfered

Looking through the debug panel, it seems as if Oled_error_init() is being called, which then tries to fill the screen buffer but ends up stuck waiting for it to stop being transferred across. I have absolutely zero knowledge of C or working with STM32s however.
 

Offline DavidAlfa

  • Super Contributor
  • ***
  • Posts: 2767
  • Country: es
Re: CFW for KSGER/Quicko STM32 Soldering Stations
« Reply #2408 on: December 01, 2021, 07:14:49 pm »
You're doing very good! :-+
Ksger v2 doesn't use hardware for the display, it's done by software, so oled.status should always be idle...hmmm
Anyways, the error appears in a very early stage, in SystemClock_Config.
Step into that function, anything that returns Hal_error, hal_timeout... Anything not being hal_ok.

By the way, in the left planes you have "Expressions".
Write there "oled.status" to view its value in realtime.
« Last Edit: December 01, 2021, 07:21:50 pm by DavidAlfa »
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 

Offline TeamTeacup

  • Contributor
  • Posts: 17
  • Country: nl
Re: CFW for KSGER/Quicko STM32 Soldering Stations
« Reply #2409 on: December 01, 2021, 07:29:02 pm »
I'm not sure what I should be looking for, but the value of RCC_OscInitStruct is 0x20002720 at the point it checks to see if its a null pointer (line 248 as part of SystemClock_Config).
 

Offline DavidAlfa

  • Super Contributor
  • ***
  • Posts: 2767
  • Country: es
Re: CFW for KSGER/Quicko STM32 Soldering Stations
« Reply #2410 on: December 01, 2021, 07:36:12 pm »
The pointer is valid, the struct data is shown in the Variables window.
Is it failing at the null check?
Otherwise step the function until something returns HAL_ERROR.

I see you're running v1.8.0, I'm still using v1.7.0.
Let me update and check few things... That part is 100% ST code, not made by me, and it's not strange that new versions come with bugs.

Edit: v1.8.0 working correctly here. Run "Step into" in HAL_RCC_OSccconfig and check what line is failing.
« Last Edit: December 02, 2021, 10:38:57 am by DavidAlfa »
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 

Offline TeamTeacup

  • Contributor
  • Posts: 17
  • Country: nl
Re: CFW for KSGER/Quicko STM32 Soldering Stations
« Reply #2411 on: December 02, 2021, 03:23:35 pm »
It halts at 'if (RCC_OscInitStruct == NULL)' while the value for it is 0x200027c0   .

 

Offline DavidAlfa

  • Super Contributor
  • ***
  • Posts: 2767
  • Country: es
Re: CFW for KSGER/Quicko STM32 Soldering Stations
« Reply #2412 on: December 02, 2021, 04:00:29 pm »
Doesn't make any sense at all  :o
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 

Offline TeamTeacup

  • Contributor
  • Posts: 17
  • Country: nl
Re: CFW for KSGER/Quicko STM32 Soldering Stations
« Reply #2413 on: December 02, 2021, 04:09:21 pm »
It doesn't make sense to me either, I'd suspect an issue with the STM32 itself but the OFW functions perfectly.
 

Offline DavidAlfa

  • Super Contributor
  • ***
  • Posts: 2767
  • Country: es
Re: CFW for KSGER/Quicko STM32 Soldering Stations
« Reply #2414 on: December 02, 2021, 04:21:25 pm »
Maybe a defective stm32 or whatever. This fw uses a lot more of resources from the stm32... weird.

A simple test... what happens?
Code: [Select]
HAL_StatusTypeDef HAL_RCC_OscConfig(RCC_OscInitTypeDef  *RCC_OscInitStruct)
{
  uint32_t tickstart;
  uint32_t pll_config;

  uint32_t *p = NULL;

  if (p==NULL){
    asm("nop");                           // Expected
  }
  p= (uint32_t*)RCC_OscInitStruct;       // Copy the pointer
asm("nop");                              // p should have nowthe same value as RCC_OscInitStruct
  if (p==(uint32_t*)RCC_OscInitStruct && p!=NULL){
    asm("nop");                          // Now it should should land here
  }
  else if(p==NULL){
    asm("nop");                          // Empty?
  }
  else{
    asm("nop");                          // Not the same value as RCC_OscInitStruct?
  }


Also check this. In main.c
Code: [Select]
void malloc_fragmentation_fix(void){
  uint32_t *ptr = NULL;
  uint32_t try=17408;
  while(!ptr && try){
    ptr = _malloc(try);
    try-=16;
  }
  _free(ptr);       // Set a breakpoint here. What's the value of "try"? Just put the mouse over it, the value should pup-up.
                    // The value should be  0x10A0 / 4256 (bytes)
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 

Offline TeamTeacup

  • Contributor
  • Posts: 17
  • Country: nl
Re: CFW for KSGER/Quicko STM32 Soldering Stations
« Reply #2415 on: December 02, 2021, 05:52:10 pm »
Switching out the HAL_RCC_OscConfig code for the one you provided doesn't seem to have made a difference, the system still does nothing. p is nulled and the value from RCC_OscInitStruct is copied over like it should be but it still halts on 'if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)' in main.c

I made sure to check malloc_fragmentation_fix as well and sure enough the value for try was 4256.
« Last Edit: December 02, 2021, 05:58:25 pm by TeamTeacup »
 

Offline DavidAlfa

  • Super Contributor
  • ***
  • Posts: 2767
  • Country: es
Re: CFW for KSGER/Quicko STM32 Soldering Stations
« Reply #2416 on: December 02, 2021, 08:25:49 pm »
I'll make a specific build for the 103R8, but as far as I know everything is the same for 48 and 64 pin versions expect more pins exposed.
What I don't understand is why an initialized pointer fails at the null check, it's simply ridiculous.

p was assigned with the same value, 0x200027c0, right?
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 

Offline mastershake

  • Frequent Contributor
  • **
  • Posts: 282
  • Country: us
Re: CFW for KSGER/Quicko STM32 Soldering Stations
« Reply #2417 on: December 02, 2021, 09:09:53 pm »
is this only on v2.1? i have a v3.1 with the 103r8 chip on one of them and it loads up fine
 

Offline DavidAlfa

  • Super Contributor
  • ***
  • Posts: 2767
  • Country: es
Re: CFW for KSGER/Quicko STM32 Soldering Stations
« Reply #2418 on: December 02, 2021, 09:14:31 pm »
I have absolutely no idea, to this date nobody has complained about this.
I've checked the memory mapping, peripherals, startup script, linker script... everything seems identical between 103R and 103C models.
I attached a project made for the 103RB. It runs perfecty in the 103C8... give it a try, although I'm pretty sure it'll fail in the same way.

Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 

Offline TeamTeacup

  • Contributor
  • Posts: 17
  • Country: nl
Re: CFW for KSGER/Quicko STM32 Soldering Stations
« Reply #2419 on: December 02, 2021, 09:58:59 pm »
I'll make a specific build for the 103R8, but as far as I know everything is the same for 48 and 64 pin versions expect more pins exposed.
What I don't understand is why an initialized pointer fails at the null check, it's simply ridiculous.

p was assigned with the same value, 0x200027c0, right?

Yup, it was 0x200027c0
 

Offline DavidAlfa

  • Super Contributor
  • ***
  • Posts: 2767
  • Country: es
Re: CFW for KSGER/Quicko STM32 Soldering Stations
« Reply #2420 on: December 03, 2021, 01:09:31 am »
Sorry, I forgot to attach the file!

https://anonfiles.com/F3V0X7Y8u3/103R8_zip

Delete the project, then click import...existing project/Select archive file and select this file.
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 

Offline TeamTeacup

  • Contributor
  • Posts: 17
  • Country: nl
Re: CFW for KSGER/Quicko STM32 Soldering Stations
« Reply #2421 on: December 03, 2021, 10:52:12 am »
This one isn't proving any better. It halts at the 'bl main' instruction in the startup_stm.s file and goes to HardFault_Handler. Could this just be a bad STM32?
 

Offline DavidAlfa

  • Super Contributor
  • ***
  • Posts: 2767
  • Country: es
Re: CFW for KSGER/Quicko STM32 Soldering Stations
« Reply #2422 on: December 03, 2021, 12:07:14 pm »
This is a new project, made from scratch. It's a very basic blinky, only toggles the buzzer pins.
Everything else is untouched. If this doesn't work, I don't know what will.
The only options left would be the stm32 being defective or a crappy counterfeit?

I'll keep trying for a while, but it's a very slow process, needing local testing, uploading the tests, waiting for feedback, etc, I could run 1000 tests in 15 minutes, so consider letting me to debug it remotely if it keeps failing.
Otherwise, I can't spend much more time with this...
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 

Online illiac4

  • Contributor
  • Posts: 38
  • Country: si
Re: CFW for KSGER/Quicko STM32 Soldering Stations
« Reply #2423 on: December 04, 2021, 07:46:05 am »
Is this the right way to do wiring for stand standby detection? I see on the picture at the same time GND to Earth is this ok?
If stand is selected shouldn't be the shake sensor disabled?

 

Offline DavidAlfa

  • Super Contributor
  • ***
  • Posts: 2767
  • Country: es
Re: CFW for KSGER/Quicko STM32 Soldering Stations
« Reply #2424 on: December 04, 2021, 09:14:27 am »
I you want stand mode, then you must disconnect it from the shake sensor in the handle, cutting the wire in the connector or removing the sensor.
Wire the shake signal from the board to somewhere, ex. like you're doing, ta a rear conector.
That signal is left floating then the handle is out, and pulled to ground when the handle is in.

Earth and ground are not the same. If your station has them connected together, then you can use it for pulling down the shake sensor input, but if not, you have to use the power supply ground.
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