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