Skip to content

Latest commit

 

History

History
100 lines (85 loc) · 4.85 KB

DEBUG.md

File metadata and controls

100 lines (85 loc) · 4.85 KB

DEBUG

Debugging weird intermittent reset:

Tests

port mode SSMP TTY Ok Notes
USB NONE ASN.1+none -
USB NONE ASN.1+ENQ -
USB NONE ASN.1+SEQ - Hangs after about an hour
USB NONE bisync+SEQ -
USB NONE bisync+GET -
USB NONE ASN.1+SEQ - vector without any decoded fields
USB NONE ASN.1+SEQ - vector without NULL fields
USB NONE ASN.1+SEQ - vector without vector_new()
RTC U2 U3 U4 LOG CLI(USB) CLI(UART0) SSMP Ok Notes
BER 16hrs , no glitch
BER 8hrs , no glitch
BER 9hrs , no glitch
decode 6hrs , no glitch
decode glitched

U4

init setup relays LEDs outputs monitor Ok Notes
x x x x x
x x x x
x x x
x x
x

Possible causes

  • too many get requests

  • full queue

  • bisync decoder

  • UART interrupt handler

  • IOX or RTC

  • USB

  • loop in _print

  • CLI TERMINAL_QUERY_STATUS printf

  • only occurs with longer SSMP requests

  • occasional SSMP echo although message processing is commented out (in reset/BOOTSEL -needs pullups on the TX/RX pins)

  • check logic around unpack_sequence and *ix

  • corrupted message ??

  • something in sequence ?

  • check all mutexes are try-lock (priority inversion)

  • U3_read ?

  • interrupt interrupting interrupt ?

  • clocks_enable_resus

  • Print out timer registers - [x] 'now'

  • Disable RTC update

  • Increase request rate

  • Mark head/tail as volatile

  • Mark head/tail as atomic (https://en.cppreference.com/w/c/language/atomic)

  • ... and then maybe make it a queue

TODO

  • Check all FIXMEs
  • Check that system doesn't freeze when print queue is full
  • Maybe only enable SSMP interrupt after a delay?
  • bisync max message size
  • (?) bisync timeout
  • Reinstate watchdog reset

GET

48 41 2 1 0 4 6 112 117 98 108 105 99 160 28 2 2 48 57 2 1 0 2 1 0 48 16 48 14 6 10 43 6 1 4 1 132 128 0 2 1 5 0

48 41 SEQUENCE 2 1 0 INTEGER 0 4 6 112 117 98 108 105 99 STRING public 160 28 PDU GET 2 2 48 57 INTEGER 2 1 0 INTEGER error:0 2 1 0 INTEGER error index:0 48 16 SEQUENCE 48 14 SEQUENCE 6 10 43 6 1 4 1 132 128 0 2 1 OID ".1.3.6.1.4.1.65536.2.1" 5 0 NULL