Micro logger

From PaparazziUAV
Jump to navigation Jump to search

Introduction

The micro logger is simply a memory chip (S25FL128S or S25FL256S) connected to one SPI port of your autopilot.

Advantages

  • very light (hard to do lighter)
  • no bad connexions (the memory needs to be soldered)

Disadvantages

  • hard to remove
  • slower than other loggers


How to use it

Configuration of the module

To configure the messages you want to log, you will need to edite the module c file in : sw/airborne/modules/loggers/high_speed_logger_direct_memory.c. At the top of the file you will have a section containing all the parameters that you can change. Among those you got :

  • ERASE_MEMORY_AT_START : if set to 1 the memory will be erased completly when starting a new log. This will take a little bit less than a minute, but afterwards you will be able to log values at a higher rate than if you didn't do it. If you let it to 0, the module is going to erase the memory block by block of 4K when needed.
  • SIZE_OF_LOGGED_VALUES : the number of Bytes that each value logged must be (in memory). You can write a 32 bits values in a 16 bites slots, you just need to be certain that you don't have any overflows.
  • NBR_VALUES_TO_LOG : the number of messages you want to log.


Then you have two arrays :

  • values_to_log : containing the pointer to the values to log.
  • name_of_the_values : the name of the messages logged. This is simply an aesthetic configuration, for you to know which message were logged.

Logging values

To use the micro logger you simply need to load the module "high_speed_logger_direct_memory" in your airframe file. Then you are going to have to add the GUI to your GCS by adding to your settings the file : "settings/modules/high_speed_logger_direct_memory.xml".

GCS mem.png

Then in the GCS you can go in the tab settings, then logger. In this tab you will have only one command to change the status of the module.

At the start the module is in idle mode. To start logging you will need to prepare the memory first. To do that simply select the initialise mode and validate. The module will work. To test if the module have completed it's work you can click on the value to the left of the drop down menu. Once completed the status will be back to idle.

Then you can start actually logging values by selecting the "start log" mode and validating.

Once you are done with your log you need to select the "stop log" mode and validate.

Reading the values back

Micro logger.png

WARNING !!! : On some boards the UART port is used also by the GPS. The soft behind the GPS might read all the values on the port instead of the logger module. To solve that issue you simply need to use an other UART port for the logger module (configured in : conf/modules/high_speed_logger_direct_memory.xml). The other solution is to move the GPS in you board makefile.

For this operation you will need to get the reader application available here.

To read the values back you simply need to connect to your autopilot using a serial connexion. Then start the micro logger application, at the top right of the interface you get a drop down menu containing all the serial ports available on your computer, select the one corresponding to your autopilot. Then simply click on the "Dump memory" button. The application is going to fetch all the values stored in the memory (warning this operation might be slow, up to 40 minutes if you used the entire memory).

Finally you can click on the export button at the bottom of the window to save the values in a csv file.