Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hangs on first calibration screen --processing-- #4

Open
ShaviTF opened this issue Oct 11, 2022 · 58 comments
Open

Hangs on first calibration screen --processing-- #4

ShaviTF opened this issue Oct 11, 2022 · 58 comments

Comments

@ShaviTF
Copy link

ShaviTF commented Oct 11, 2022

The whole procedure has apparently gone well, but when I start the device for the first time, it asks me to place the probe to ground, then to put it in DC mode and when I click ok it indicates --processing-- and it hangs... Any suggestion?

2022-10-11 12 02
2022-10-11 12 03 (1)
2022-10-11 12 03

@mean00
Copy link
Owner

mean00 commented Oct 11, 2022

Hi
You have done the hard part
That problem is usually the sign of a problem when saving stuff to the flash
1- What is the complete reference of the MCU ? Would it be a CH32F103 by any chance ?
2- Which binary did you use / how did you build it if you built it from source ?

@ShaviTF
Copy link
Author

ShaviTF commented Oct 11, 2022

Hello... first of all, thank you for the work you are doing and for taking the trouble to help us...

1.  About the MCU is the STM32F103C8T6. I have been researching and I have seen that this one comes with 64 and with 128K. I am using STM's "Flash loader Demonstrator" to program it, and when I plug it in it saids me that it's the 128k version . 

2. I have tried the FNIRSI binary (without bootloader) flashing to 64k (in this case it boots but the ok button doesn't work) and the JYTECH binary (with bootloader) flashing to 128k... (The application doesn't give me any errors and after writing it verifies correctly, which makes me assume that it's really the MCU is 128k), but in this case it is where the calibration hangs.
 
I have not tried to compile the software myself, basically because I have never done it, but I will try to investigate how to do it

@mean00
Copy link
Owner

mean00 commented Oct 12, 2022

1- Ok, assuming it's a guenuine STMF103CxT6 it should have 128 kB (but claiming it has only 64 kB)
The "Flash loader Demonstrator" is using serial or swd ? There was report that if it using serial, you should make sure the watchdog is disabled and try to flash it twice, it may help (dont ask why)

2- Ok that behaviour shows it is not a CH32 style motherboard

If you can, try flashing the code using a stlinkv2 + openOCD or something similar, it should work

@ShaviTF
Copy link
Author

ShaviTF commented Oct 13, 2022

I am using UART, I don't have SWD programmer. I have tried programming several times and there is no difference. I've also tried disabling WatchDog (WDG_SW) with the "Flash Loader Demonstrator", but doing so only gives me a blank screen at boot. It's weird... I can get into DFU, and everything seems ok until it gets to calibration... then it hangs with the message "-processing-"

@mean00
Copy link
Owner

mean00 commented Oct 13, 2022

Could you try the attached binary ?
It skips calibration check, so you'll have garbage on screen but to check everything else works
[](url
lnDSO_nocal.zip

@mean00
Copy link
Owner

mean00 commented Oct 13, 2022

If it fails at the first calibration step (i.e. AC or DC) and not a the end, it's not the flash
but rather the ADC
If the test binary works for you, you can try manually doing a calibration
Long press the rotary encoder to enter menu
then
Calibration -> wipe calibration
reboot
Calibration -> Basic calibrate

@ShaviTF
Copy link
Author

ShaviTF commented Oct 13, 2022

Ok... now finaly i could got into the application, but, although it does record data, the graph is not shown, that is, I can enter the menus and if I change the "Test signal" menu values (amplitude and frequency), these are reflected in the values detected by de probe in the left column, but the graph is not displayed on the main screen.

About calibration still not working. That is, I can do the "wipe calibration", but after reboot, when I hit basic calibration, it hangs at the same point as before (although now it doesn't show the sentence -processing-)
1
2
3
4

@mean00
Copy link
Owner

mean00 commented Oct 13, 2022

Ok so in "normal" mode the ADC is working
The display is gibberish because without calibration the values are out of scale
Can you get the serial output when you do calibration ?
(115200 / 8 bits/ no hw flow control / no parity)

@ShaviTF
Copy link
Author

ShaviTF commented Oct 13, 2022

Ok...

The only read i get is:
Adc : Asked for fq=1000 got fq=1000
intDiv:1 int Frac=6464

And then it hangs immediately

@mean00
Copy link
Owner

mean00 commented Oct 13, 2022

If you are willing to help me, i can try to find out what's going wrong by providing test firmwares, will probably take a few steps

@ShaviTF
Copy link
Author

ShaviTF commented Oct 13, 2022

No problem. For sure i will help you... in the real you are helping me :D

@mean00
Copy link
Owner

mean00 commented Oct 13, 2022

Does this work ?, it will go to calibration at start
(Trying to pindown the issue)
nocal_mark2.zip

@ShaviTF
Copy link
Author

ShaviTF commented Oct 13, 2022

Now as you say goes to calibration at start, but hangs at "-processing-" again.

Terminal output is similar:
Adc : Asked for fq=1000 got fq=1000
intDiv:1 intFrac=6464
Setting new GainRange=0

@mean00
Copy link
Owner

mean00 commented Oct 14, 2022

Next : This is the expected output
Setting new GainRange=0
Starting ADC...
Ending ADC...
Range : 0 val=2062

My guess is you will only have Starting ADC...
cal3.zip

@ShaviTF
Copy link
Author

ShaviTF commented Oct 14, 2022

New output:
Adc : Asked for fq=1000 got fq=1000
intDiv:1 intFrac=6464
Setting new GainRange=0
Starting ADC...

keeps hanging on -processing-

@mean00
Copy link
Owner

mean00 commented Oct 16, 2022

Another one to test, i'm not expecting it to work but i fixed a bug, mayb....

A couple of questions :

  • When you switch the AC/DC button, does the display reflect the change (AC->DC->GND) ? If so it means ADC2 is working
  • The quartz should be a 8 Mhz one, could you confirm ?

nocal4.zip

@ShaviTF
Copy link
Author

ShaviTF commented Oct 16, 2022

Ok...sorry for the late response...I was out all day...
It seems that now there is more information. I enclose the complete trace since the equipment starts.

  • Regarding whether the changes made to the AC/DC switch are reflected, yes, they are reflected. Before the calibration, it tells me in which position it is requiring me to position it in DC in order to proceed with the calibration.

  • I can also confirm that quartz is 8 Mhz

Hope this can help you

Setuping up DSO...
0: R=18 overSampling=0
1: R=36 overSampling=0
2: R=90 overSampling=0
3: R=180 overSampling=0
4: R=360 overSampling=0
5: R=900 overSampling=0
6: R=1800 overSampling=0
7: R=3600 overSampling=0
8: R=9000 overSampling=0
9: R=18000 overSampling=0
10: R=36000 overSampling=0
11: R=90000 overSampling=0
Starting sanity Check
Check ok
read Offset =0x4
Starting DSO...
Setting new GainRange=7
Adc : Asked for fq=20000 got fq=20000
intDiv:0 intFrac=3600
New timebase=6 : 1ms, fq=20000
Cannot read invert setting
Loading calibration data
Cannot load AC calibration
Adc : Asked for fq=1000 got fq=1000
intDiv:1 intFrac=6464
Setting new GainRange=0
Starting ADC...
Ending ADC...
Range : 0 val=2077
Setting new GainRange=1
Starting ADC...

after that, it keeps hanging on "-processing-"
cuarzo

@mean00
Copy link
Owner

mean00 commented Oct 17, 2022

That one may work
nocal5.zip

@ShaviTF
Copy link
Author

ShaviTF commented Oct 17, 2022

I think we've taken a step backwards...
The new output:

Setuping up DSO...
0: R=18 overSampling=0
1: R=36 overSampling=0
2: R=90 overSampling=0
3: R=180 overSampling=0
4: R=360 overSampling=0
5: R=900 overSampling=0
6: R=1800 overSampling=0
7: R=3600 overSampling=0
8: R=9000 overSampling=0
9: R=18000 overSampling=0
10: R=36000 overSampling=0
11: R=90000 overSampling=0
Starting sanity Check
Check ok
read Offset =0x4
Starting DSO...
Setting new GainRange=7
Adc : Asked for fq=20000 got fq=20000
intDiv:0 intFrac=3600
New timebase=6 : 1ms, fq=20000
Cannot read invert setting
Loading calibration data
Cannot load AC calibration
Adc : Asked for fq=1000 got fq=1000
intDiv:1 intFrac=6464
Setting new GainRange=0
Starting ADC...

With the previous firmware we got to GainRange=1... but with this one we are again stuck at GainRange=0

I programmed it several times, even doing a full wipe and reinstalling the bootloader just in case... but there were no differences... except for the "sanity check" part.

On the first boot after full wipe, in that "section" the message is different
...
11: R=90000 overSampling=0
No valid sector found, reformatting
Nvm not operational, reformatting...
Starting DSO...
...
I understand that it is normal for the first start.
When restarting it already starts with the sequence that I put above

@mean00
Copy link
Owner

mean00 commented Oct 17, 2022

Would it be possible for you to get a st linkv 2 clone and upload that way ? ( a clone is ~ 2$ or so)

I tried with DSO based on CH32/STM32/GD32 with all the versions i provided, they all work fine.
The only difference is the way you flash it so far

If you happen to have a bluepill board, you can put the blackmagic software on it temporarily to flash the DSO

@Sebclem
Copy link

Sebclem commented Nov 8, 2022

Hi,
I have the exact same issue,
I flashing with blackmagic (using blackmagic-bluepill).

Hanging at DC Calibration

Flashed with:
bootloader_2.2.elf
lnDSO_JYETECH_2.2.elf

The only issue that I have is that it seams that the erase does not work: After erase, the DSO boot normally to the calibration screen.
Update: erase work with the gbd command monitor erase_mass, reboot to a white screen.
Re flashing and the same issue is here, still hanging at DC calibration.

@Sebclem
Copy link

Sebclem commented Nov 8, 2022

That one may work nocal5.zip

@mean00 Can you upload the elf of this, so I can test it.

@mean00
Copy link
Owner

mean00 commented Nov 8, 2022

Please find cal6 attached, should be similar to cal5
When it is stuck, it would be interesting to see if it crashed i.e. the output of the 'bt' command
cal6.zip

@mean00
Copy link
Owner

mean00 commented Nov 8, 2022

  • be absolutely sure it is not a FNIRSI PCB

@Sebclem
Copy link

Sebclem commented Nov 8, 2022

It seam to be a FNIRSI but with STM32 F103C8T6:
(Ordered in 2021)
image
PXL_20221108_182006798

I have tried before with the FNIRSI efi but the Ok button seam to no not work.

I'm trying the cal6.

@mean00
Copy link
Owner

mean00 commented Nov 8, 2022

The main diff between FNIRSI and non FNIRSI :

  • the detection of AC/DC/GND
  • the test signal range is hardwired to 0..3.3 v on FNIRSI

So if the fw can detect the AC/DC/GND switch position, you have the correct fw for that board

@Sebclem
Copy link

Sebclem commented Nov 8, 2022

Serial logs:

Setuping up DSO...
0: R=18 overSampling=0
1: R=36 overSampling=0
2: R=90 overSampling=0
3: R=180 overSampling=0
4: R=360 overSampling=0
5: R=900 overSampling=0
6: R=1800 overSampling=0
7: R=3600 overSampling=0
8: R=9000 overSampling=0
9: R=18000 overSampling=0
10: R=36000 overSampling=0
11: R=90000 overSampling=0
Starting sanity Check
Check ok
read Offset =0x4
Starting DSO...
Setting new GainRange=7
Adc : Asked for fq=20000 got fq=20000
intDiv:0 intFrac=3600
New timebase=6 : 1ms, fq=20000
Cannot read invert setting
Loading calibration data
Cannot load AC calibration
Adc : Asked for fq=1000 got fq=1000
intDiv:1 intFrac=6464
Setting new GainRange=0
Starting ADC...

gdb :

(gdb) target extended-remote COM4
Remote debugging using COM4
(gdb) mon swdp_scan
Target voltage: 3.26V
Available Targets:
No. Att Driver
 1      STM32F1 (clone) medium density M3
(gdb) attach 1
Attaching to Remote target
warning: No executable has been specified and target does not support
determining executable automatically.  Try using the "file" command.
0x08004e92 in ?? ()
(gdb) bt
#0  0x08004e92 in ?? ()
#1  0x08005668 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) file cal6.elf
A program is being debugged already.
Are you sure you want to change the file? (y or n) y
Reading symbols from cal6.elf...
(gdb) bt
#0  0x08004e92 in prvCheckTasksWaitingTermination () at /home/fx/Arduino_gd32/lnDSO150/lnArduino/FreeRTOS/tasks.c:3697
#1  prvIdleTask (pvParameters=<optimized out>) at /home/fx/Arduino_gd32/lnDSO150/lnArduino/FreeRTOS/tasks.c:3447
#2  0x08005f1c in prvPortStartFirstTask () at /home/fx/Arduino_gd32/lnDSO150/lnArduino/FreeRTOS/portable/GCC/ARM_CM3/port.c:242
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

I'm no familiar with gdb, so if I have done anything in the wrong way, please tell me

@mean00
Copy link
Owner

mean00 commented Nov 8, 2022

No, it's good :)
It did not crash, it's just waiting for the ADC to say "done".

If you are ok with it, I'll create a few test programs to narrow down why the ADC is not working as expected

@mean00
Copy link
Owner

mean00 commented Nov 8, 2022

Could you try running the code i.e.
mon swdp_scan
attach 1
file cal6.elf
r <== that line

it should reset then start

@Sebclem
Copy link

Sebclem commented Nov 8, 2022

It look like there is no crash, the program just start and hang:

(gdb) r
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: C:\Users\seb65\Documents\DSO\cal6.elf

But, i think the is more logs ?

Setuping up DSO...
0: R=18 overSampling=0
1: R=36 overSampling=0
2: R=90 overSampling=0
3: R=180 overSampling=0
4: R=360 overSampling=0
5: R=900 overSampling=0
6: R=1800 overSampling=0
7: R=3600 overSampling=0
8: R=9000 overSampling=0
9: R=18000 overSampling=0
10: R=36000 overSampling=0
11: R=90000 overSampling=0
Starting sanity Check
Check ok
read Offset =0x4
Starting DSO...
Setting new GainRange=7
Adc : Asked for fq=20000 got fq=20000
intDiv:0 intFrac=3600
New timebase=6 : 1ms, fq=20000
Cannot read invert setting
Loading calibration data
Cannot load AC calibration
Adc : Asked for fq=1000 got fq=1000
intDiv:1 intFrac=6464
Setting new GainRange=0
Starting ADC...
Ending ADC...
Range : 0 val=2123
Setting new GainRange=1
Starting ADC...
Ending ADC...
Range : 1 val=2173
Setting new GainRange=2
Starting ADC...

Hanging at GainRange=2 but before was GainRange=0

@mean00
Copy link
Owner

mean00 commented Nov 9, 2022

This one tries to reset the ADC more in depth
cal7.zip

@Sebclem
Copy link

Sebclem commented Nov 9, 2022

Still nothing:

Setuping up DSO...
0: R=18 overSampling=0
1: R=36 overSampling=0
2: R=90 overSampling=0
3: R=180 overSampling=0
4: R=360 overSampling=0
5: R=900 overSampling=0
6: R=1800 overSampling=0
7: R=3600 overSampling=0
8: R=9000 overSampling=0
9: R=18000 overSampling=0
10: R=36000 overSampling=0
11: R=90000 overSampling=0
Starting sanity Check
Check ok
read Offset =0x4
Starting DSO...
Setting new GainRange=7
Adc : Asked for fq=20000 got fq=20000
intDiv:0 intFrac=3600
New timebase=6 : 1ms, fq=20000
Cannot read invert setting
Loading calibration data
Cannot load AC calibration
Adc : Asked for fq=1000 got fq=1000
intDiv:1 intFrac=6464
Setting new GainRange=0
Starting ADC...

PS: I see that you are french, if you want we can have a visio call to make more advanced debugging

@mean00
Copy link
Owner

mean00 commented Nov 9, 2022

I'm building a new version that uses a different calibration method. Ready in ~ 15mn
ps : Bien noté :)

@Sebclem
Copy link

Sebclem commented Nov 9, 2022

Ok interesting, I have made some debugging:

(gdb) break averageADCRead
Breakpoint 3 at 0x80088c6: file /home/fx/Arduino_gd32/lnDSO150/src/dso_calibrate.cpp, line 223.
(gdb) run
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: C:\Users\seb65\Documents\DSO\cal7.elf

Breakpoint 2, waitForCoupling (target=DSOControl::DSO_COUPLING_DC) at /home/fx/Arduino_gd32/lnDSO150/src/dso_calibrate.cpp:176
176     /home/fx/Arduino_gd32/lnDSO150/src/dso_calibrate.cpp: No such file or directory.
(gdb) continue
Continuing.

Breakpoint 3, 0x080088c6 in averageADCRead () at /home/fx/Arduino_gd32/lnDSO150/src/dso_calibrate.cpp:223
223     in /home/fx/Arduino_gd32/lnDSO150/src/dso_calibrate.cpp
(gdb) next
doCalibrate (array=<optimized out>, color=color@entry=2047, txt=txt@entry=0x8012c48 "", target=target@entry=DSOControl::DSO_COUPLING_DC) at /home/fx/Arduino_gd32/lnDSO150/src/dso_calibrate.cpp:247
247     in /home/fx/Arduino_gd32/lnDSO150/src/dso_calibrate.cpp
(gdb) next
248     in /home/fx/Arduino_gd32/lnDSO150/src/dso_calibrate.cpp
(gdb) next
249     in /home/fx/Arduino_gd32/lnDSO150/src/dso_calibrate.cpp
(gdb) next

The last reponsive line seams to be 249 in dso_calibrate.cpp

@mean00
Copy link
Owner

mean00 commented Nov 9, 2022

That one is not using DMA to calibrate

cal8.zip

@Sebclem
Copy link

Sebclem commented Nov 9, 2022

Ahhh, we are going forward:
DC is ok, but now blocked at AC calibration

Setuping up DSO...
0: R=18 overSampling=0
1: R=36 overSampling=0
2: R=90 overSampling=0
3: R=180 overSampling=0
4: R=360 overSampling=0
5: R=900 overSampling=0
6: R=1800 overSampling=0
7: R=3600 overSampling=0
8: R=9000 overSampling=0
9: R=18000 overSampling=0
10: R=36000 overSampling=0
11: R=90000 overSampling=0
Starting sanity Check
Check ok
read Offset =0x4
Starting DSO...
Setting new GainRange=7
Adc : Asked for fq=20000 got fq=20000
intDiv:0 intFrac=3600
New timebase=6 : 1ms, fq=20000
Cannot read invert setting
Loading calibration data
Cannot load AC calibration
Setting new GainRange=0
Starting ADC...
Ending ADC...
Range : 0 val=2122
Setting new GainRange=1
Starting ADC...
Ending ADC...
Range : 1 val=2178
Setting new GainRange=2
Starting ADC...
Ending ADC...
Range : 2 val=2150
Setting new GainRange=3
Starting ADC...
Ending ADC...
Range : 3 val=2137
Setting new GainRange=4
Starting ADC...
Ending ADC...
Range : 4 val=2128
Setting new GainRange=5
Starting ADC...
Ending ADC...
Range : 5 val=2125
Setting new GainRange=6
Starting ADC...
Ending ADC...
Range : 6 val=2123
Setting new GainRange=7
Starting ADC...
Ending ADC...
Range : 7 val=2161
Setting new GainRange=8
Starting ADC...
Ending ADC...
Range : 8 val=2142
Setting new GainRange=9
Starting ADC...
Ending ADC...
Range : 9 val=2132
Setting new GainRange=10
Starting ADC...
Ending ADC...
Range : 10 val=2126
Setting new GainRange=0
Starting ADC...
Ending ADC...
Range : 0 val=2122
Setting new GainRange=1
Starting ADC...
Ending ADC...
Range : 1 val=2183
Setting new GainRange=2
Starting ADC...
Ending ADC...
Range : 2 val=2154
Setting new GainRange=3
Starting ADC...
Ending ADC...
Range : 3 val=2139
Setting new GainRange=4
Starting ADC...
Ending ADC...
Range : 4 val=2129
Setting new GainRange=5
Starting ADC...
Ending ADC...
Range : 5 val=2125
Setting new GainRange=6
Starting ADC...
Ending ADC...
Range : 6 val=2124
Setting new GainRange=7
Starting ADC...
Ending ADC...
Range : 7 val=2162
Setting new GainRange=8
Starting ADC...
Ending ADC...
Range : 8 val=2142
Setting new GainRange=9
Starting ADC...
Ending ADC...
Range : 9 val=2132
Setting new GainRange=10
Starting ADC...
Ending ADC...
Range : 10 val=2126

@mean00
Copy link
Owner

mean00 commented Nov 9, 2022

ok, that's normal
Next coming

@mean00
Copy link
Owner

mean00 commented Nov 9, 2022

is it stuck in
#0 0x0800f42c in lnGetUs () at /home/fx/Arduino_gd32/lnDSO150/lnArduino/src/lnSystemTimer_arm_gd32fx.cpp:60
#1 0x080064be in lnDelayUs (wait=wait@entry=100) at /home/fx/Arduino_gd32/lnDSO150/lnArduino/src/systemHelper.cpp:95
#2 0x08004640 in delayMicroseconds (wait=wait@entry=100) at /home/fx/Arduino_gd32/lnDSO150/lnArduino/arduinoLayer/src/wrapper.cpp:64
#3 0x08003708 in unlock () at /home/fx/Arduino_gd32/lnDSO150/lnArduino/src/lnFMC.cpp:100
#4 0x0800391e in lnFMC::write (startAddress=134345844, data=data@entry=0x2000332c <ucHeap+12548> "\005", sizeInBytes=sizeInBytes@entry=8) at /home/fx/Arduino_gd32/lnDSO150/lnArduino/src/lnFMC.cpp:214
?

@Sebclem
Copy link

Sebclem commented Nov 9, 2022

Nop, but not far:

(gdb) continue
Continuing.

Program received signal SIGINT, Interrupt.
lnDelayUs (wait=wait@entry=100) at /home/fx/Arduino_gd32/lnDSO150/lnArduino/src/systemHelper.cpp:98
98      /home/fx/Arduino_gd32/lnDSO150/lnArduino/src/systemHelper.cpp: No such file or directory.

@mean00
Copy link
Owner

mean00 commented Nov 9, 2022

ok, it is stuck writing in the flash, smells of stack smashing
I'll look into it tomorrow

Thanks!

@mean00
Copy link
Owner

mean00 commented Nov 10, 2022

Trying to reformat the flash before writing, it may help
cal9.zip

@Sebclem
Copy link

Sebclem commented Nov 10, 2022

Calibration seams to work:

Setuping up DSO...
0: R=18 overSampling=0
1: R=36 overSampling=0
2: R=90 overSampling=0
3: R=180 overSampling=0
4: R=360 overSampling=0
5: R=900 overSampling=0
6: R=1800 overSampling=0
7: R=3600 overSampling=0
8: R=9000 overSampling=0
9: R=18000 overSampling=0
10: R=36000 overSampling=0
11: R=90000 overSampling=0
Starting sanity Check
Check ok
read Offset =0x6a
Starting DSO...
Setting new GainRange=7
Adc : Asked for fq=20000 got fq=20000
intDiv:0 intFrac=3600
New timebase=6 : 1ms, fq=20000
Loading calibration data
Inconistent size
Cannot load AC calibration
Setting new GainRange=0
Starting ADC...
Ending ADC...
Range : 0 val=2126
Setting new GainRange=1
Starting ADC...
Ending ADC...
Range : 1 val=2142
Setting new GainRange=2
Starting ADC...
Ending ADC...
Range : 2 val=2132
Setting new GainRange=3
Starting ADC...
Ending ADC...
Range : 3 val=2132
Setting new GainRange=4
Starting ADC...
Ending ADC...
Range : 4 val=2162
Setting new GainRange=5
Starting ADC...
Ending ADC...
Range : 5 val=2142
Setting new GainRange=6
Starting ADC...
Ending ADC...
Range : 6 val=2124
Setting new GainRange=7
Starting ADC...
Ending ADC...
Range : 7 val=0
Setting new GainRange=8
Starting ADC...
Ending ADC...
Range : 8 val=2123
Setting new GainRange=9
Starting ADC...
Ending ADC...
Range : 9 val=2123
Setting new GainRange=10
Starting ADC...
Ending ADC...
Range : 10 val=2126
Setting new GainRange=0
Starting ADC...
Ending ADC...
Range : 0 val=2126
Setting new GainRange=1
Starting ADC...
Ending ADC...
Range : 1 val=2142
Setting new GainRange=2
Starting ADC...
Ending ADC...
Range : 2 val=2132
Setting new GainRange=3
Starting ADC...
Ending ADC...
Range : 3 val=2132
Setting new GainRange=4
Starting ADC...
Ending ADC...
Range : 4 val=2162
Setting new GainRange=5
Starting ADC...
Ending ADC...
Range : 5 val=2142
Setting new GainRange=6
Starting ADC...
Ending ADC...
Range : 6 val=2124
Setting new GainRange=7
Starting ADC...
Ending ADC...
Range : 7 val=0
Setting new GainRange=8
Starting ADC...
Ending ADC...
Range : 8 val=2123
Setting new GainRange=9
Starting ADC...
Ending ADC...
Range : 9 val=2123
Setting new GainRange=10
Starting ADC...
Ending ADC...
Range : 10 val=2126
OK
OK

After restart, i seen the main page, but no line or data:
original_2d523325-55f7-4d90-880f-bd2bda088192_PXL_20221110_092830160

Here is the logs:

Setuping up DSO...
0: R=18 overSampling=0
1: R=36 overSampling=0
2: R=90 overSampling=0
3: R=180 overSampling=0
4: R=360 overSampling=0
5: R=900 overSampling=0
6: R=1800 overSampling=0
7: R=3600 overSampling=0
8: R=9000 overSampling=0
9: R=18000 overSampling=0
10: R=36000 overSampling=0
11: R=90000 overSampling=0
Starting sanity Check
Check ok
read Offset =0x4c
Starting DSO...
Setting new GainRange=7
Adc : Asked for fq=20000 got fq=20000
intDiv:0 intFrac=3600
New timebase=6 : 1ms, fq=20000
Cannot read invert setting
Loading calibration data
VolMenu : redraw 0
time redraw : redraw 0
voltTrigger_redraw : redraw 0
stat redraw : redraw 0
voltTriggerValue_redraw : redraw 0
*
*
*
...

@mean00
Copy link
Owner

mean00 commented Nov 10, 2022

and if you connect the probe to the signal generator you see squares ?

@Sebclem
Copy link

Sebclem commented Nov 10, 2022

Nope, still nothing

@mean00
Copy link
Owner

mean00 commented Nov 10, 2022

Try long press on V/DIV

@Sebclem
Copy link

Sebclem commented Nov 10, 2022

Hanging like for calibration:

Event:1 , key:3
Adc : Asked for fq=20000 got fq=20000
intDiv:0 intFrac=3600
New timebase=6 : 1ms, fq=20000
Setting new GainRange=9

@Sebclem
Copy link

Sebclem commented Nov 10, 2022

Ok interesting, i have manged to have something but only at 20ms, other time range don't work (red rectangle on top right and no refresh), and the voltage seams wrong (I have checked the probe and it's in 1x mode) :
PXL_20221110_100636433

@mean00
Copy link
Owner

mean00 commented Nov 10, 2022

interesting
It means using the 20ms frequency to calibrate should work
All the used resources are internal to the MCU : ADC / DMA / Timer
So either :

  • there is bug where it works or not depending on temperature or something
  • you dont have a different MCU (not a STM32 or a different one)

There was issues like that with the GD32. They were bugs that didnt cause problem on the STM32 but didnt work with the GD32.

@Sebclem
Copy link

Sebclem commented Nov 10, 2022

The MCU is a STM32F103C8T6, and after looking for the documentation, it look like i have only 64k of flash, can this be related ?
(C 8 T 6 ==> 8 = 64 Kbytes flash )

@mean00
Copy link
Owner

mean00 commented Nov 10, 2022

Normally they have all 128 kB, even if "officially" some have 64 kB
You can verify when you load the code with the blackmagic
monitor swdp_scan
attach 1
load or file
compare-sections <<= that will verify all has been written correctly

@mean00
Copy link
Owner

mean00 commented Nov 10, 2022

And please check the quartz is a 8Mhz one, that 's probably the case

@yuanwb1984
Copy link

My imitation dso150 stays at setting input to DC, no button responds;
Regardless of short press or long press; I use the serial port to download the firmware and it is probably successful;
The mcu is stm32f103c8t6 programmed according to 128k and the verification is successful;
Tomorrow I will test the above firmware and record the serial port information;
Thanks a lot for your work, sorry for my weird english because I'm using google translate;

@mean00
Copy link
Owner

mean00 commented Jan 5, 2023

If the buttons are not working it is a hint you may have the wrong FW
non fnirsi fw on a fnirsi board
or
fnisi fw on a non fnirsi board

@mean00
Copy link
Owner

mean00 commented Jan 5, 2023

Same for AC/DC selection

@yuanwb1984
Copy link

Use ST-LINK Utility to re-download bootloader_2.2.bin and lnDSO_JYETECH_2.2.bin, same as yesterday, get some serial port output:
Setuping up DSO...
0: R=18 overSampling=0
1: R=36 overSampling=0
2: R=90 overSampling=0
3: R=180 overSampling=0
4: R=360 overSampling=0
5: R=900 overSampling=0
6: R=1800 overSampling=0
7: R=3600 overSampling=0
8: R=9000 overSampling=0
9: R=18000 overSampling=0
10: R=36000 overSampling=0
11: R=90000 overSampling=0
Starting sanity Check
Check ok
read Offset =0x4
Starting DSO...
Setting new GainRange=7
Adc : Asked for fq=20000 got fq=20000
intDiv:0 intFrac=3600
New timebase=6 : 1ms, fq=20000
Cannot read invert setting
Loading calibration data
Cannot load AC calibration
###I hit the ok button here
Adc : Asked for fq=1000 got fq=1000
intDiv:1 intFrac=6464

Does not respond to any keystrokes after that
I want to test cal9.elf, but I don't know how to convert it into a bin file

@MarkedOne
Copy link

Has there been any progress on this? I'm having the same issues :(

@mean00
Copy link
Owner

mean00 commented Jun 28, 2024

What DSO are you using ?
What is the marking on the chip ? STM32F10x or CH32Fxx ?
the current assumption is the board is using a not so compatible clone of the STM32F103

@MarkedOne
Copy link

It's the STM32F103 (STM32F103CBT6). I managed to get it working again on the Jyetech 113-15001-120 firmware with the patch and activation code and all previous versions after posting here but lnDSO150 still looks appealing 😄

Fair assumption. If there's anything I can share to help, let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants