Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
direct_memory_logger module

Directly log values to memory for flash chips.

No detailed description...

Example for airframe file

Add to your firmware section: This example contains all possible configuration options, not all of them are mandatory!

<module name="direct_memory_logger">
b'<configure name="DM_LOG_UART" value="UART1|UART2|UART3|UART4|UART5|UART6" />\n '
b'<configure name="DM_LOG_SPI_DEV" value="SPI1|SPI2|SPI3|SPI4|SPI5|SPI6" />\n '
b'<configure name="DM_LOG_SPI_SLAVE_IDX" value="SPI_SLAVE1|SPI_SLAVE2|SPI_SLAVE3|SPI_SLAVE4|SPI_SLAVE5|SPI_SLAVE6" />\n '
</module>

Module configuration options

Configure Options

  • name: DM_LOG_UART value: UART1|UART2|UART3|UART4|UART5|UART6
    Description: Port to read back the memory
  • name: DM_LOG_SPI_DEV value: SPI1|SPI2|SPI3|SPI4|SPI5|SPI6
    Description: SPI bus which the memory is connected to
  • name: DM_LOG_SPI_SLAVE_IDX value: SPI_SLAVE1|SPI_SLAVE2|SPI_SLAVE3|SPI_SLAVE4|SPI_SLAVE5|SPI_SLAVE6
    Description: SPI slave which the memory is connected to

Module functions

Init Functions

These initialization functions are called once on startup.

Periodic Functions

These functions are called periodically at the specified frequency from the module periodic loop.

Files

Header Files

The following headers are automatically included in modules.h

Source Files

Raw direct_memory_logger.xml file:

<!DOCTYPE module SYSTEM "module.dtd">
<module name="direct_memory_logger" dir="loggers">
<doc>
<description>
Directly log values to memory for flash chips.
</description>
<configure name="DM_LOG_UART" value="UART1|UART2|UART3|UART4|UART5|UART6" description="Port to read back the memory"/>
<configure name="DM_LOG_SPI_DEV" value="SPI1|SPI2|SPI3|SPI4|SPI5|SPI6" description="SPI bus which the memory is connected to"/>
<configure name="DM_LOG_SPI_SLAVE_IDX" value="SPI_SLAVE1|SPI_SLAVE2|SPI_SLAVE3|SPI_SLAVE4|SPI_SLAVE5|SPI_SLAVE6" description="SPI slave which the memory is connected to"/>
</doc>
<settings>
<dl_settings name="direct_memory_logger">
<dl_settings name="direct_memory">
<dl_setting module="loggers/direct_memory_logger" var="dml.status" shortname="Status" min="0" step="1" max="2" values="INIT|IDLE|ERASE|START|RUNNING|STOP|READ|READING" handler="set"/>
<dl_setting module="loggers/direct_memory_logger" var="dml.sst.flash_addr" shortname="Flash ADDR" min="0" step="1" max="16777215"/>
<dl_setting module="loggers/direct_memory_logger" var="dml.write_addr" shortname="Write ADDR" min="0" step="1" max="16777215"/>
</dl_settings>
</dl_settings>
</settings>
<dep>
<depends>spi_master</depends>
</dep>
<header>
<file name="direct_memory_logger.h"/>
</header>
<init fun="direct_memory_logger_init()"/>
<periodic fun="direct_memory_logger_periodic()" autorun="TRUE"/>
<makefile target="ap">
<configure name="DM_LOG_UART" default="uart1" case="upper|lower"/>
<configure name="DM_LOG_SPI_DEV" default="spi2" case="upper|lower"/>
<configure name="DM_LOG_SPI_SLAVE_IDX" default="spi_slave1" case="upper|lower"/>
<define name="USE_$(DM_LOG_SPI_DEV_UPPER)" value="1" />
<define name="USE_$(DM_LOG_SPI_SLAVE_IDX_UPPER)" value="1" />
<define name="DM_LOG_SPI_DEV" value="$(DM_LOG_SPI_DEV_LOWER)" />
<define name="DM_LOG_SPI_SLAVE_IDX" value="$(DM_LOG_SPI_SLAVE_IDX_UPPER)" />
<define name="DM_LOG_UART" value="$(DM_LOG_UART_LOWER)"/>
<define name="USE_$(DM_LOG_UART_UPPER)"/>
<define name="$(DM_LOG_UART_UPPER)_BAUD" value="B230400"/>
<file name="direct_memory_logger.c"/>
<file name="sst25vfxxxx.c" dir="peripherals"/>
</makefile>
</module>