-
-
Notifications
You must be signed in to change notification settings - Fork 361
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
chore: new module/serial API #3055
Conversation
4edba39
to
f02ba8d
Compare
102e275
to
355e379
Compare
and remove methods specific to internal or external module
@gagarinlg Yes, I think this TRACE should be disabled or have it's own define. What do you think? |
then I get : |
Maybe a leftover Cmake doesn't know any more. Just for testing remove
|
here the result:
|
This is where it is failing in
It is waiting for a STK_INSYNC (0x14) but receives a permanent 0xff response. It looks like the serial driver is not initialized properly. The old driver switched polarity at this point and tried again. Here's wild guess 2: serial driver initialized with wrong polarity. If you want to give it a try comment the last line in this snippet:
|
wait a sec, not enough |
|
no success:
|
Ok, thanks for trying. We now know there is something wrong with the serial communication between radio and module. At this point I'd check the voltage on the VCC pin just after the flash is initiated and then fire up my logic analyzer to see what's going out and if the module is responding, what's going in, the serial parameters and levels (active high or low). Unfortunately I don't have an external MPM, so I have to call timeout. |
we can communicate via discord? |
i have tested all the time with an active model where the ext. MPM is not active at all. Then flashing does not seem to work anyway. Now I have activated a model in which the MPM is active, with the version of 8.2. checked that it is really flashable and then took the last DEBUG variant. The MPM could not be flashed again, but now comes another message:
|
Go back to the version were you just changed the wait time to 5s
Von: ParkerEde ***@***.***
Gesendet: Sunday, March 12, 2023 8:29 PM
An: EdgeTX/edgetx ***@***.***>
Cc: Michael ***@***.***>; Mention ***@***.***>
Betreff: Re: [EdgeTX/edgetx] chore: new module/serial API (PR #3055)
i have tested all the time with an active model where the ext. MPM is not active at all. Then flashing does not seem to work anyway. Now I have activated a model in which the MPM is active, with the version of 8.2. checked that it is really flashable and then took the last DEBUG variant. The MPM could not be flashed again, but now comes another message:
00s: {463,48,479,224}
23.00s: {0,255,176,271}
23.11s: {0,0,479,44}
23.22s: {0,0,479,44}
23.22s: {0,255,176,271}
23.25s: {0,255,176,271}
23.32s: {0,0,479,44}
23.40s: {463,48,479,224}
23.40s: {0,255,176,271}
23.48s: {0,0,479,44}
23.48s: {463,48,479,224}
23.48s: {0,255,176,271}
23.59s: {0,0,479,44}
23.70s: {0,0,479,44}
23.70s: {0,255,176,271}
23.73s: {463,48,479,224}
23.73s: {0,255,176,271}
23.80s: {0,0,479,44}
23.83s: {463,48,479,224}
23.91s: {0,0,479,44}
23.94s: {463,48,479,224}
24.02s: {0,0,479,44}
24.05s: {463,48,479,224}
24.13s: {0,0,479,44}
24.24s: {0,0,479,44}
24.34s: {0,0,479,44}
24.45s: {0,0,479,44}
24.56s: {0,0,479,44}
24.56s: {0,255,176,271}
24.59s: {0,255,176,271}
24.66s: {0,0,479,44}
24.74s: {0,255,176,271}
24.82s: {0,0,479,44}
24.82s: {0,255,176,271}
24.93s: {0,0,479,44}
25.04s: {0,0,479,44}
25.15s: {0,0,479,44}
25.27s: {0,0,479,44}
25.29s: {463,48,479,224}
25.38s: {0,0,479,44}
25.38s: {463,48,479,224}
25.49s: {0,0,479,44}
25.52s: {463,48,479,224}
25.61s: {0,0,479,44}
25.61s: {463,48,479,224}
25.61s: {0,255,176,271}
25.64s: {463,48,479,224}
25.64s: {0,255,176,271}
25.72s: {0,0,479,44}
25.72s: {463,48,479,224}
25.88s: {0,0,479,44}
25.99s: {0,0,479,44}
25.99s: {0,255,176,271}
26.03s: {0,255,176,271}
26.11s: {0,0,479,44}
26.28s: {0,0,479,44}
26.28s: {463,48,479,224}
26.28s: {0,255,176,271}
26.31s: {463,48,479,224}
26.31s: {0,255,176,271}
26.39s: {0,0,479,44}
26.42s: {463,48,479,224}
26.50s: {0,0,479,44}
26.53s: {463,48,479,224}
26.62s: {0,0,479,44}
26.73s: {0,0,479,44}
26.84s: {0,0,479,44}
26.84s: {0,255,176,271}
26.87s: {0,255,176,271}
26.95s: {0,0,479,44}
26.95s: {463,48,479,224}
26.98s: {463,48,479,224}
27.07s: {0,0,479,44}
27.10s: {0,255,176,271}
27.18s: {0,0,479,44}
27.18s: {0,255,176,271}
27.29s: {0,0,479,44}
27.41s: {0,0,479,44}
27.52s: {0,0,479,44}
27.63s: {0,0,479,44}
27.75s: {0,0,479,44}
27.86s: {0,0,479,44}
27.97s: {0,0,479,44}
28.09s: {0,0,479,44}
28.09s: {0,255,176,271}
28.12s: {0,255,176,271}
28.20s: {0,0,479,44}
28.23s: {0,255,176,271}
28.31s: {0,0,479,44}
28.31s: {0,255,176,271}
28.35s: {463,48,479,224}
28.35s: {0,255,176,271}
28.43s: {0,0,479,44}
28.43s: {0,255,176,271}
28.46s: {463,48,479,224}
28.54s: {0,0,479,44}
28.54s: {463,48,479,224}
28.57s: {463,48,479,224}
28.65s: {0,0,479,44}
28.77s: {0,0,479,44}
28.79s: {463,48,479,224}
28.89s: {0,0,479,44}
28.89s: {463,48,479,224}
28.89s: {0,255,176,271}
28.93s: {0,255,176,271}
29.00s: {0,0,479,44}
29.17s: tab time: 126 ms
29.31s: {0,0,479,271}
29.33s: {0,0,479,68}
30.12s: SCROLL[x=0;y=-85;top=85;bottom=7]
30.12s: SCROLL[x=0;y=-7;top=92;bottom=0]
30.14s: SCROLL[x=0;y=92;top=0;bottom=-203]
30.17s: tab time: 34 ms
30.21s: {0,0,479,271}
30.91s: {0,69,287,271}
30.91s: {288,69,479,271}
31.06s: {0,69,287,271}
31.06s: {288,69,479,271}
31.16s: {0,69,287,271}
31.16s: {288,69,479,271}
31.18s: SCROLL[x=0;y=-2;top=2;bottom=327]
31.21s: {0,69,287,271}
31.21s: {288,69,479,271}
31.46s: {0,69,287,271}
31.46s: {288,69,479,271}
31.61s: {0,69,287,271}
31.61s: {288,69,479,271}
31.76s: {0,69,287,271}
31.76s: {288,69,479,271}
31.88s: SCROLL[x=0;y=2;top=0;bottom=329]
31.91s: {0,69,287,271}
31.91s: {288,69,479,271}
32.75s: {0,69,287,271}
32.97s: {0,69,287,271}
33.47s: {0,69,287,271}
33.47s: {288,69,479,271}
33.51s: {0,69,287,271}
33.51s: {288,69,479,271}
33.56s: {0,69,287,271}
33.56s: {288,69,479,271}
33.58s: SCROLL[x=0;y=-2;top=2;bottom=370]
33.61s: {0,69,287,271}
33.61s: {288,69,479,271}
33.63s: SCROLL[x=0;y=-41;top=43;bottom=329]
33.66s: {0,69,287,271}
33.66s: {288,69,479,271}
33.68s: SCROLL[x=0;y=-41;top=84;bottom=288]
33.71s: {0,69,287,271}
33.71s: {288,69,479,271}
33.78s: SCROLL[x=0;y=-62;top=146;bottom=226]
33.81s: {0,69,287,271}
33.81s: {288,69,479,271}
33.83s: SCROLL[x=0;y=-62;top=208;bottom=164]
33.86s: {0,69,287,271}
33.86s: {288,69,479,271}
33.88s: SCROLL[x=0;y=-62;top=270;bottom=102]
33.92s: {0,69,287,271}
33.92s: {288,69,479,271}
33.93s: SCROLL[x=0;y=-62;top=332;bottom=40]
33.97s: {0,69,287,271}
33.97s: {288,69,479,271}
34.08s: SCROLL[x=0;y=-40;top=372;bottom=0]
34.12s: {0,69,287,271}
34.12s: {288,69,479,271}
34.39s: {0,0,479,68}
35.58s: {0,0,479,271}
36.45s: {140,54,339,216}
36.64s: flashing '/FIRMWARE/multi-v1.3.3.20.bin'
36.64s: Module #1 de-init succeeded
36.72s: {0,0,479,271}
44.72s: [Wait for Sync]
47.42s: {0,0,479,271}
54.14s: enablePulsesInternalModule(): trigger scan
54.14s: Module #1 init succeeded
54.15s: scan [255]
54.16s: scan [255]
54.16s: scan [255]
54.17s: scan [255]
54.18s: scan [255]
54.18s: scan [255]
54.19s: scan [255]
54.19s: {0,0,479,271}
54.20s: scan [255]
54.20s: scan [255]
54.21s: scan [255]
54.21s: {0,0,479,68}
54.22s: scan [255]
54.23s: scan [255]
54.23s: scan [255]
54.24s: scan [255]
54.25s: scan [255]
54.25s: scan [255]
54.26s: scan [255]
59.28s: {0,0,479,68}
60.51s: CANCEL[0xd02b36c0]
60.61s: {0,0,479,271}
60.64s: SD card write labels
60.69s: eeprom write model
60.69s: YAML model writer
60.70s: disk_write bad alignment (0x10008290)
60.70s: disk_write bad alignment (0x10008290)
60.71s: disk_write bad alignment (0x10008290)
60.71s: disk_write bad alignment (0x10008290)
60.71s: disk_write bad alignment (0x10008290)
60.71s: disk_write bad alignment (0x10008290)
60.72s: disk_write bad alignment (0x10008290)
60.72s: disk_write bad alignment (0x10008290)
60.72s: disk_write bad alignment (0x10008290)
60.72s: disk_write bad alignment (0x10008290)
60.73s: disk_write bad alignment (0x10008290)
60.73s: disk_write bad alignment (0x10008290)
60.73s: disk_write bad alignment (0x10008290)
60.73s: disk_write bad alignment (0x10008290)
60.74s: disk_write bad alignment (0x10008290)
60.74s: disk_write bad alignment (0x10008290)
60.74s: disk_write bad alignment (0x10008290)
60.74s: disk_write bad alignment (0x10008290)
60.75s: disk_write bad alignment (0x10008290)
60.75s: disk_write bad alignment (0x10008290)
60.75s: disk_write bad alignment (0x10008290)
60.76s: disk_write bad alignment (0x10008290)
60.76s: disk_write bad alignment (0x10008290)
60.76s: disk_write bad alignment (0x10008290)
60.76s: disk_write bad alignment (0x10008290)
60.77s: disk_write bad alignment (0x10008290)
60.77s: disk_write bad alignment (0x10008290)
60.77s: disk_write bad alignment (0x10008290)
60.77s: disk_write bad alignment (0x10008290)
60.78s: disk_write bad alignment (0x10008290)
60.78s: disk_write bad alignment (0x10008290)
60.78s: disk_write bad alignment (0x10008290)
60.78s: disk_write bad alignment (0x10008290)
60.79s: disk_write bad alignment (0x10008290)
60.79s: disk_write bad alignment (0x10008290)
60.79s: disk_write bad alignment (0x10008290)
60.79s: disk_write bad alignment (0x10008290)
60.80s: disk_write bad alignment (0x10008290)
60.80s: disk_write bad alignment (0x10008290)
60.80s: disk_write bad alignment (0x10008290)
60.80s: disk_write bad alignment (0x10008290)
60.80s: disk_write bad alignment (0x10008290)
60.81s: disk_write bad alignment (0x10008290)
60.81s: disk_write bad alignment (0x10008290)
60.81s: disk_write bad alignment (0x10008290)
60.81s: disk_write bad alignment (0x10008290)
60.82s: disk_write bad alignment (0x10008290)
60.82s: disk_write bad alignment (0x10008290)
60.82s: disk_write bad alignment (0x10008290)
60.82s: disk_write bad alignment (0x10008290)
60.83s: disk_write bad alignment (0x10008290)
60.83s: disk_write bad alignment (0x10008290)
60.83s: disk_write bad alignment (0x10008290)
60.83s: disk_write bad alignment (0x10008290)
60.83s: disk_write bad alignment (0x10008290)
60.84s: disk_write bad alignment (0x10008290)
60.84s: disk_write bad alignment (0x10008290)
60.84s: disk_write bad alignment (0x10008290)
60.85s: <63 Test Ext Tx/0> : 0,0,0
60.85s: <63 Test Ext Tx/1> : 6,2,0
60.89s: {0,0,479,44}
60.96s: {0,0,479,44}
60.99s: {0,255,176,271}
61.04s: {0,255,176,271}
61.12s: {0,0,479,44}
61.15s: {463,48,479,224}
61.24s: {0,0,479,44}
61.24s: {463,48,479,224}
61.24s: {0,255,176,271}
61.28s: {0,255,176,271}
61.36s: {0,0,479,44}
61.47s: {0,0,479,44}
61.50s: {0,255,176,271}
61.58s: {0,0,479,44}
61.61s: {0,255,176,271}
61.69s: {0,0,479,44}
61.82s: {0,0,479,44}
61.82s: {463,48,479,224}
61.86s: {463,48,479,224}
61.93s: {0,0,479,44}
61.97s: {463,48,479,224}
62.05s: {0,0,479,44}
62.05s: {463,48,479,224}
62.18s: {0,0,479,44}
62.18s: {0,255,176,271}
62.21s: {463,48,479,224}
62.21s: {0,255,176,271}
62.30s: {0,0,479,44}
62.30s: {463,48,479,224}
62.30s: {0,255,176,271}
62.34s: {0,255,176,271}
62.41s: {0,0,479,44}
62.53s: {0,0,479,44}
62.56s: {0,255,176,271}
62.65s: {0,0,479,44}
62.65s: {0,255,176,271}
62.69s: {0,255,176,271}
62.77s: {0,0,479,44}
62.77s: {0,255,176,271}
62.77s: {0,255,176,271}
63.01s: {0,0,479,44}
63.01s: {0,255,176,271}
63.04s: {0,255,176,271}
63.14s: {0,0,479,44}
63.14s: {0,255,176,271}
63.18s: {0,255,176,271}
63.26s: {0,0,479,44}
63.38s: {0,0,479,44}
63.51s: {0,0,479,44}
63.51s: {0,255,176,271}
63.54s: {463,48,479,224}
63.54s: {0,255,176,271}
63.54s: {303,255,479,271}
63.63s: {0,0,479,44}
63.63s: {303,255,479,271}
63.67s: {463,48,479,224}
63.75s: {0,0,479,44}
63.79s: {303,255,479,271}
63.87s: {0,0,479,44}
63.87s: {303,255,479,271}
63.91s: {463,48,479,224}
64.00s: {0,0,479,44}
64.00s: {463,48,479,224}
—
Reply to this email directly, view it on GitHub <#3055 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABK23XABVQFOVY4EBKG3QZDW3YPYBANCNFSM6AAAAAAT5RATH4> .
You are receiving this because you were mentioned. <https://github.com/notifications/beacon/ABK23XFC7WEVLKXSBFC2ZXLW3YPYBA5CNFSM6AAAAAAT5RATH6WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSXKZTCY.gif> Message ID: ***@***.*** ***@***.***> >
|
I have already done. But there comes again "[RX] 0xFF". So nothing changes in the final result, only that now the lines with the "scan [255]" appear. |
"scan [255]" is the radio polling MPM protocols after the flash failed as part of the new initialization |
btw "disk_write bad alignment" points to a sd card problem. insert the SD card on your PC, try open a windows cmd shell and do chkdsk /f |
I have done it. No errors were found. The SD card and its contents are okay. |
The you might have found some other bug too TX16s 2.9: I just flashed my internal multi successful. I wonder if what you see is some side effect of disabling the heartbeat port. |
do you have your internal module off? |
yes |
I also noticed that with the Horus X10 Express, the selection "Flash external Device" is no longer available when I want to flash a "frsk" or a "frk" file with ENTER via SDCard Browser. |
Same Bluetooth problem on TX16S and T18 with internal Bluetooth mod - works perfect under 2.8 (selfbuild 30.11.2022) but no adresse on 2.9 selfbuild from master today. |
New interfaces
hal/module_port.h
:module ports
. Amodule port
is a pin or group of pin that delivers either a serial or timer interface)
with the module.
hal/timer_driver.h
:New generic drivers
We have 3 completly new generic drivers for the STM32 platform in
targets/common/arm/stm32
:stm32_serial_driver
:STM32SerialDriver
implements a generic serial driver (etx_serial_driver_t
).stm32_softserial_driver
:STM32SoftSerialTxDriver
implements a generic serial transmitter that using a DMA timerchannel to generate a chain of either PWM (PXX1 encoding) or TOGGLE events.
STM32SoftSerialRxDriver
implements a generic serial receiver based on a EXTI (start bitdetection) and a timer IRQ to sample the bits.
module_timer_driver
: simple API defining a PWM sender.Eventually, we should have a number of drivers that are not dependent on specific hardware
but only on a platform, and probably later some drivers that do not even depend on a
specific platform. That should allow to implement feature on top that are much more portable.
Boards
To offer something between a specific target (ex: TX16S) and a platform (STM32), boards
have been introduced. Boards offer hardware definitions linked to a suitable driver
in a way support by the ETX HAL.
The
generic_stm32
board offers some definitions for hardware used all over EdgeTX and shouldbe understood as some sort of Board Support Package (BSP).
Cleanup
A lot of cleanup has been done as part of this PR:
pulses/
: The biggest chunk is of course the module protocol implementationsthat now all make use of
module ports
. This allows for removing hardwaredependent
#idefs
, and thus use a more generic code.telemetry
: telemetry data are now directly linked to the module protocol driverand processed by a method provided as part of the API, so that we should soon be able
to remove the global
telemetryProtocol
.countless small things related to the previous 2 all over the place...
TODOs
Follow-up ideas
reusableBuffer
ATM).