Skip to content
magnuskarlsson edited this page Nov 16, 2010 · 9 revisions

Operating modes

SDLogger can operate in one of three modes - New Log (default), Sequential Log and Command-line mode. The operating mode can be changed by editing the CONFIG.txt file on the SD card.

Logging is automatically started after power-up initialization in New Log and Sequential Log mode. Any character received on the serial port after power-up initialization will be written to a file on the SD card without any user intervention. The difference between the two modes is the file creation - in New Log mode a new log file is created on every startup (LOGXXXXX.txt) while in Sequential Log mode data will be appended to the end of the sequential log file (SEQLOG.txt). The logging is stopped and Command-line mode is entered if the escape-sequence is received while logging. Default escape-sequence is three Ctrl-z characters (this can be changed in the config file).

Command-line mode allows the user to enter commands to do things like list SD card file content, remove files, list files etc. Entering ? at the command prompt will display a list of available commands.

Configuration

SDLogger can be configured by editing the CONFIG.txt file on the SD card. The default CONFIG.txt file has one line and looks like this:** 9600,26,3,0** (each value is separated by a comma):

  • 9600: The communication baud rate. 9600bps by default. Acceptable values are 2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400.
  • 26: The ASCII value (in decimal form) for the escape character. 26 is Ctrl-z, 36 is ‘$’.
  • 3: The number of escape characters required. Default is three so you must hit Ctrl-z three time to drop to Command-line mode.
  • 0: System mode. SDLogger starts in New Log mode (‘0’) by default. Acceptable values are 0 = New Log, 1 = Sequential Log, or 2 = Command-line mode.

Startup message

During power up, you will see 12> or 12<. 1 indicates the serial connection is established. 2 indicates the SD card has been successfully initialized.

  • ‘<’ indicates OpenLog is ready and will log any serial data received (this is the default mode)
  • ‘>’ indicates OpenLog is ready to receive commands.

Status LEDs

  • STAT1 LED is the green LED on the right side of the board. This LED toggles on/off every time a new character is received. This LED helps troubleshoot and indicate serial communication is working. STAT1 LED is also used at power-up to indicate initialization problems:
    • 3 Blinks: The SD card failed to initialize or the SD card is missing. You may need to format the card on a computer.
    • 5 Blinks: SDLogger has changed to a new baud rate and needs to be power cycled.
  • STAT2 LED is the red LED on the left side of the board. This LED will flash every time the SD card is accessed (read or write). It's also used by the bootloader to indicate bootloader entry (5 short flashes).
Clone this wiki locally