Projekt

Allgemein

Profil

Wiki » Historie » Version 60

Maximilian Seesslen, 07.10.2025 15:01

1 60 Maximilian Seesslen
[[Eval]]
2 40 Maximilian Seesslen
[[Schematics]]
3
4 1 Maximilian Seesslen
h1. Wiki
5
6 54 Maximilian Seesslen
(Polnisch fuer Ausfall, Stoerung)
7
8 1 Maximilian Seesslen
There are some issues that can only be tested via power resets.
9
10
* SPI has an issue that it needs retries
11
* Looks like configuration I2C EEPROM gets reset to defaults
12 3 Maximilian Seesslen
* RTC-offline-test (Wie lange haelt die RTC Batterie)
13 1 Maximilian Seesslen
14 3 Maximilian Seesslen
The device has an CANBus in and an CANBus out. The testsoftware is on the DUT. The DUT sends the command to toggle power line to Awaria via CAN.
15
The switch-off time has to be an parameter. The RTC-Tests will be complex, the Awaria software shall be simple and generic.
16 2 Maximilian Seesslen
17
An data multiplexer can be used along with a mosfet for power line.
18 13 Maximilian Seesslen
Data lines for CAN and UART have to be cut. 
19
In order to cut UART, an Debug-Adapter chaining would be needed. Or Uart is available via Host-USB.
20 2 Maximilian Seesslen
21 15 Maximilian Seesslen
Optionally controll it via USB from PC, not MCU. Optically isolated GPIOs.
22 12 Maximilian Seesslen
23 14 Maximilian Seesslen
h1. Problem
24
25
Circuit does not help at all when power is injected into device via Pullup of RS232. Lines can be disabled too. But whole
26 1 Maximilian Seesslen
debug connector can cause issues: No debug connection at all.
27 15 Maximilian Seesslen
FPC with UART only? All signals disconnectable?
28 14 Maximilian Seesslen
29 37 Maximilian Seesslen
A problem is the debug adapter. Switching the signals from one MCU to another is not nice. 
30
Flashing the MCU that controlls the lines may result in dead board. Fixed lines are better; always able to flash a device.
31
32 38 Maximilian Seesslen
-Usually a reset is enough. The total off test is quite special. But there is no output available.-
33
34
The periphery tests need a complete disconnect, even when for some problems a reset was enough.
35
36
Uart of Awira? optional when main tests are running on PC.
37
DUT is connected to Awira via debug connector and canbus or power line.
38
Awira is connected to CAN bus.
39
PC is connected via debug board to Awira, signal routed to DUT.
40 39 Maximilian Seesslen
Flip-Flop for debug routing would be nice. A big button to route the debug port is nice.
41
SN74LVC1G80DCKR
42
2xUart
43 38 Maximilian Seesslen
2xSWD
44 1 Maximilian Seesslen
2xBoot/Reset
45
VDD Target
46 39 Maximilian Seesslen
-Jumperresistor to connect the uart of the DUT to awaria.-
47
48 24 Maximilian Seesslen
h1. Usecases
49 1 Maximilian Seesslen
50
* Devices have their own test-software and ask awaria to perform an power-cycle for them. Result is stored in option Bytes.
51 41 Maximilian Seesslen
** Because the software is running on DUT, debug can stay routed to DUT.
52
53 24 Maximilian Seesslen
* PC performs test. DUT has to send Log-Events when errors show up and when device is up and running. DUT firmware can be the productive firmware.
54
** Tester-Firmware on PC is quite generic
55 1 Maximilian Seesslen
** CAN may not be available yet (CANDis). That was one intention of repeated log code
56 24 Maximilian Seesslen
** CANDis may be configured to use USB. No UART output here. USB does also not help then.
57 41 Maximilian Seesslen
58 30 Maximilian Seesslen
* Long time tests. Device can be in a permanent reboot loop with alternating writing/reading EEPROM. Awaria can persist status and result. Cordyceps can readout values at any time.
59 24 Maximilian Seesslen
60 28 Maximilian Seesslen
h2. Usecases with products
61 1 Maximilian Seesslen
62 36 Maximilian Seesslen
* I2C has an issue that some times the board has to wait at bootup quite long time till i2c eeprom is functional.
63 42 Maximilian Seesslen
** How much time can it take till i2c is functional
64
** Is fix working 100%; device will boot 100 times
65 36 Maximilian Seesslen
66
* CANDis looses touch calibration; SPI has an issue that some times the board has to wait at bootup quite long time till spi flash is functional.
67 53 Maximilian Seesslen
** How much time can it take till spi is functional
68 42 Maximilian Seesslen
** Is fix working 100%; device will boot 100 times
69 36 Maximilian Seesslen
70 1 Maximilian Seesslen
* CANDis; measure RTC durability
71 46 Maximilian Seesslen
** Can be done via Awaria in case the test has to run over months
72 43 Maximilian Seesslen
73 1 Maximilian Seesslen
* CANSwitch; check I2C-EEPROM-Config reliability
74 36 Maximilian Seesslen
75
* Long time boot tests
76 43 Maximilian Seesslen
77
* Miniminutnik
78
** redirected Uart would make sense here
79 25 Maximilian Seesslen
80 28 Maximilian Seesslen
h2. Problems:
81
82
* RTC: Cant check if there was an I2C problem or RTC was actually not valid. CI2cSlace-Class needs better status handling besides "isPresent". DeviceError or ContentError
83
* Waste biwak with TDT-Specific values? Use own error code range. LogEvents support custom data types.
84 25 Maximilian Seesslen
85 2 Maximilian Seesslen
h1. Parts
86
87
* MCU: The smallest thing
88 34 Maximilian Seesslen
* Multiplexer: "Link":https://www.tme.eu/de/katalog/analoge-multiplexer-und-schalter_100222/?params=383:1443902,1474454_anzahl-kanale:4,16&activeView=parameter&onlyInStock=1&productListOrderBy=1000015
89 3 Maximilian Seesslen
** MC14551BDG bis zu 1K RON: 1050
90
** TS5A23166DCUR cool, 2 channels, up to 100mA, 1,8-6,5V
91 6 Maximilian Seesslen
** Habe:
92 7 Maximilian Seesslen
*** DG408LEDQ-T1-GE3; .#273;  1:8
93 20 Maximilian Seesslen
*** DG409LEDQ-T1-GE3; .#321;  2x 1:4
94 8 Maximilian Seesslen
*** ADG736; .#315; 2x1:2
95 20 Maximilian Seesslen
*** *RS2102XN ADG836YRMZ* Das ist er; 2x
96 21 Maximilian Seesslen
** MAX4760; 8 Channels; Paarweise schalten
97 58 Maximilian Seesslen
** TMUX1574 4xSPDT; 1 Schalter; 0.474€; 1,8V logic
98
** *PI5C3257QE*; 4xSPDT; 1 Schalter; 0.229€; 2 Davon und gut ist.
99 1 Maximilian Seesslen
100 58 Maximilian Seesslen
* High/Low-side switch
101
** TDE1707BFP
102
** Im Prinzip reichen ein N und ein P MOSFET. Der N-Mosfet schaltet den P Mosfet gleich mit.
103
104 32 Maximilian Seesslen
* Big EEPROM, device can store test info from DUT. Maybe a second EEPROM just for costom data persisting. Can hold data in RAM.
105 4 Maximilian Seesslen
106
Spannungs/Strom zu umstaendlich.
107 1 Maximilian Seesslen
108 10 Maximilian Seesslen
"Cables":https://www.tme.eu/de/katalog/ffc-fpc-bander_113269/?params=673:1451575;425:1478584;1184:1479746&activeView=parameter&queryPhrase=fpc&onlyInStock=1&productListOrderBy=1000015
109 58 Maximilian Seesslen
110 35 Maximilian Seesslen
111 10 Maximilian Seesslen
h1. RTC-Tests
112
113
Can have a region in SPI-Flash.
114 11 Maximilian Seesslen
If the Settings are not ok, just have an terminal.
115
The test can only be started from terminal.
116
rebootTest <startTime>
117
118 10 Maximilian Seesslen
Start. 
119
* Cut 2 Seconds. Time OK?
120
* Cut 4 Seconds. Time OK?
121 1 Maximilian Seesslen
* Cut 8 Seconds. Time OK?
122 11 Maximilian Seesslen
123
When it fails, "destroy" test-config in spi flash
124 12 Maximilian Seesslen
125 48 Maximilian Seesslen
h1. Off-Desk tests 
126
127
* Awaria can toggle an CANDis till RTC is not valid any more.
128
* The test could run for month
129
* An eeprom is enough to store the result. The device can be connected to PC and data can be read via UART or CAN.
130
* Only CAN may be connected when debug is not accessible on device. Target Node-ID has to be configured. This can be done via CAN.
131
* Progress LEDs needed
132
* This is the 99,9% solution.
133
* Broken EEPROM-Config can not be detected because ID does not match any more; result is timeout. But reboot can be stoped, problem can be seen.
134 49 Maximilian Seesslen
*
135 48 Maximilian Seesslen
136 12 Maximilian Seesslen
h1. Connectors
137
138
* CANBus-In
139
* CANBus.Out
140 45 Maximilian Seesslen
* -Power in, 5V, 3V-
141 31 Maximilian Seesslen
* Power out, 5V, 3V
142 17 Maximilian Seesslen
* -USB PC to MCU-
143 1 Maximilian Seesslen
* -USB PC to DUT-
144 45 Maximilian Seesslen
* Debug in
145
* Debug out
146 17 Maximilian Seesslen
147
Debug, CAN, power only?
148 18 Maximilian Seesslen
CAN-Geraete koennten auch standalone laufen, Testsoftware auf PC.
149
150
2x Uart
151
2x SWD
152
1x Reset
153 19 Maximilian Seesslen
1x Boot0
154
2x CAN
155 22 Maximilian Seesslen
(DEBUG: VDD_5VIN, GND, VDD_TGT, SWO)
156 23 Maximilian Seesslen
157
USB schalten is overkill, andere Platine.
158 47 Maximilian Seesslen
159
* Battery lifetime checks.
160
161 1 Maximilian Seesslen
* How long does minutnik-eink run with one charge?
162 47 Maximilian Seesslen
** It has to send pings via Uart.
163 51 Maximilian Seesslen
** Printing uptime periodically would do the job. -> Avoid power injection?
164 52 Maximilian Seesslen
165
h1. Further examples
166
167
* Toggle miniminutnik till eeprom error. Instead of an battery, the 3V connector has to be feeded.
168
Strange setup; PC reads UART output of DUT and controls Awaria via CAN.
169 54 Maximilian Seesslen
170
h1. Usecases
171
172
* Reboot until RTC is broken
173
** How to detect problems?
174
*** Device schickt selber commandos ab. Via CAN.
175
** Sobald geraet bootet funtkioniert Seriel auch wieder
176 55 Maximilian Seesslen
177
Am einfachsten:
178
179
SWD ist garnicht durchgeroutet
180
Nur UART RX/TX gehen auf eigenen debug anschluss.
181
Ist device off, hat man eine COmmandline von Awaria.
182
Es koennen Programme abgefahren werden wie "peridoc 60 3".
183
Taster On/Off bricht Programm auch ab.
184
Auf dem Host sieht man abwechselnd Statistic und Target Output.
185
Awaria kann auch auf CAN Nachricht warten (I2C problem).
186 56 Maximilian Seesslen
SWD doch durchrouten, dann ist flaschen kein Problem.
187 57 Maximilian Seesslen
   switch 1: CAN+UART
188
   switch 2: SWDIO, SWCLK, boot, reset
189 56 Maximilian Seesslen
190
Battery lifetime checks:
191
* Target gibt periodisch Uptime aus. Awaria schaltet sich peridisch auf
192
* I2C Problem: "expect 63 0x495 0x0": Stop as soon as system state has problems
193 57 Maximilian Seesslen
* RTC test: Reboot-count can be send as TDT
194 59 Maximilian Seesslen
195
Optionally not switch UART? No usecase.