EdgeTX / edgetx

EdgeTX is the cutting edge open source firmware for your R/C radio
https://edgetx.org
GNU General Public License v2.0
1.53k stars 326 forks source link

EM on TX16S MK1 writing color file on SD #3133

Open waasnsteffl opened 1 year ago

waasnsteffl commented 1 year ago

Is there an existing issue for this problem?

What part of EdgeTX is the focus of this bug?

Transmitter firmware

Current Behavior

Hi

I have the following Emergency Mode Problem on my TX

TX16S Mk1, 4in1 2.7.1

After some editiing and writing a color scheme back it goes into EM. Ribbons have been cleaned. Used 3 different SD cards (8,16,32GB), newly formatted and copied from original resource. Every cards filesystem has been checked under Windows, every sector read and rewritten under Freeebsd. The first 5 times or so, after creating a new card, you can write a changed color file to the sd. Then it starts to go into EM. Permanently from now on. All other changes for model or system writes on the SD working fine. A binary look in to those written files show no problems in syntax or charackters compared to the original colorfiles. The files who generated a EM are perfectly usable after reboot.

Please suggest what i can do. As i am a retired informatic system engineer, i am willing to help. Could changing some hardware help and where to order?

Thanks Anton

Expected Behavior

working write of colorfile

Steps To Reproduce

see bug description

Version

2.7.1

Transmitter

Radiomaster TX16S / TX16SMK2

Anything else?

No response

philmoz commented 1 year ago

There has been some work in this area recently - can you try the latest nightly build and see if the problem is still there.

waasnsteffl commented 1 year ago

Took me the time and refreshed bootloader newly with stm32 prog to 2.8.0. not a nighly at the moment. then mm-stm-serial-taer-v1.3.3.20.bin, added latest LUA, THEMES and MODELS. same Symtoms, after 3 times editing color and writing to SD, again EM. Again the color file is working after reboot.

philmoz commented 1 year ago

The changes are not in 2.8.0, please try the latest nightly build.

Also can you zip up the entire contents of the problem theme folder and post it here.

waasnsteffl commented 1 year ago

installed now 2.9.0 6af2bb7

tx16s-6af2bb7.bin* mm-stm-serial-taer-v1.3.3.20.bin

edgetx.sdcard.version gives 2.9

radio.yml gives semver: 2.9.0 board: tx16s

same problems as before, seems to be even worse EM when defining widgets, but indeterministic Widgets seem not to be able to read out TX accu.
( hope i did not overseen something when defining )

theme that i edited, caused EM included now

again tested r/w every sector on sd, no error

btw: when i updated from 2.7.0 to 2.8.0, then loadeded mm-stm-serial-taer-v1.3.3.20.bin, system hanged in the middle
of writes. theme.txt

pfeerick commented 1 year ago

FYI, once you've loaded a MPM firmware, there is no need to write it again... updating or downgrading EdgeTX does not affect the MPM firmware version as that is separate.

When you were editing the theme, did it happen to be the "active" theme rather than an inactive one? As I noticed there is more of a tendency to crash if it were the active theme being edited/saved (and then applied/refreshed), suggesting the issue could be in the code related to refreshing the active theme colours - especially as IIRC the changes had been saved to SD, and the radio booted up fine using the edited colours/theme.

waasnsteffl commented 1 year ago

complete THE THEMES.zip MES folder as suggested

waasnsteffl commented 1 year ago

On 2.9.0 I edited both, active and unactive Theme. first on active, was OK, next on a copy (ANTON_A) ,ok. EM appeared after 3rd write to SD, and from that on every time...

philmoz commented 1 year ago

I tried your THEMES folder on my TX16S and I can't reproduce this at all - it is very strange. I can edit the theme colors as many times as I like and do not get any EM.

Do you have another SD card you could try?

waasnsteffl commented 1 year ago

I tried 3 diff cards (8,16,32 GB, FAT32) with 2.7.0 with same results, every card completly tested with raw write/rewrites. At the moment i have the SD mounted on an up and running 2.9.0. Under FreeeBSD i have mounted the data partition per usb while it is the tx16s. What i test now is the capability doing a read and a rewrite of the raw sectors of the SD using dd_rescue, while its in the tx16s. dd_rescue: (info): Using softbs=128.0kiB, hardbs=4.0kiB dd_rescue: (warning): Not using sparse writes for non-seekable output dd_rescue: (warning): infile and outfile are identical! dd_rescue: (info): ipos: 200704.0k, opos: 200704.0k, xferd: 200704.0k errs: 0, errxfer: 0.0k, succxfer: 200704.0k +curr.rate: 411kB/s, avg.rate: 413kB/s, avg.load:-80.+%

may be this shows hardware and or underlying system issues of 2.9.0. but it is extremly slow in case of no errs, rather points to programming problems. arent ther log s possible? what about changing internal hardware as i want to prepare myself for some masterships ?
do i have a usage/knowlede problem when can i not get the TX accu voltage into a widget? hope the accu is fit enough for this long write/rewrite

waasnsteffl commented 1 year ago

have now written/rewritten about 2 Gbs using the tx16s as card reader

[0]root@af[1016][11:55am][~]dd_rescue /dev/da0 /dev/da0 dd_rescue: (info): Using softbs=128.0kiB, hardbs=4.0kiB dd_rescue: (warning): Not using sparse writes for non-seekable output dd_rescue: (warning): infile and outfile are identical! dd_rescue: (info): ipos: 2082816.0k, opos: 2082816.0k, xferd: 2082816.0k errs: 0, errxfer: 0.0k, succxfer: 2082816.0k +curr.rate: 410kB/s, avg.rate: 412kB/s, avg.load:-80.+%

no errors...... All Files on SD uncorrupted. taking out the usb plug made the tx16 problemlessly switch back to the last task, just in the middle of defining a new widget, which means for me, that undlerlying rtos has no problems with my sd cards...

philmoz commented 1 year ago

I wonder if this is somehow related to the widgets on the active model?

Can you try setting up a simple model on the radio with no widgets configured and then try editing the themes while the simple model is the active model.

waasnsteffl commented 1 year ago

Hi, same with native model, nothing defined, 2nd writing
of the theme - EM

What about the mentioned zero volt in the widget for Bat. In system voltage is correctable, while zero in the corresponding widget.

used RTos in the 1980ies a lot with Bcpl, so i do not know how testing is done today, but isnt there a firmware with logging facility for testing one could use?

PS: could someone point me to responsible, where i could order suggested harware parts, so i can get a working system?

philmoz commented 1 year ago

What about the mentioned zero volt in the widget for Bat. In system voltage is correctable, while zero in the corresponding widget.

Which widget are you using?

used RTos in the 1980ies a lot with Bcpl, so i do not know how testing is done today, but isnt there a firmware with logging facility for testing one could use?

You would probably need to hook up a hardware debugger to the radio.

waasnsteffl commented 1 year ago

i used - widget/value/batt, but seems to work after reboot. dont think so, but at least it could have been my wrong programming