Skip to content
Snippets Groups Projects
  1. Mar 12, 2017
  2. Mar 11, 2017
  3. Mar 10, 2017
    • David Sidrane's avatar
      HOTFIX:Backport of second round upstream NuttX i2c fix (#6771) · c967cade
      David Sidrane authored
      backport 3cd66af889b42b036d6c9d88e067fc3b8abbdb2a and pr 258
      
         Applies to STM32F4 and STM32F7
      
         STM32, STM32 F7, and STM32 L4: Clone Freddie Chopin's I2C change to similar STM32 I2C drivers.
      
         Save elapsed time before handling I2C in stm32_i2c_sem_waitstop()
         This patch follows the same logic as in previous fix to
         stm32_i2c_sem_waitdone().
         It is possible that a context switch occurs after I2C registers are read
         but before elapsed time is saved in stm32_i2c_sem_waitstop(). It is then
         possible that the registers were read only once with "elapsed time"
         equal 0. When scheduler resumes this thread it is quite possible that
         now "elapsed time" will be well above timeout threshold. In that case
         the function returns and reports a timeout, even though the registers
         were not read "recently".
         Fix this by inverting the order of operations in the loop - save elapsed
         time before reading registers. This way a context switch anywhere in the
         loop will not cause an erroneous "timeout" error.
      c967cade
    • David Sidrane's avatar
      HOTFIX:Backport of upstream NuttX i2c fix · 60c8c84e
      David Sidrane authored
         5a6d95dd9f051be548a8d2378aaef75f0a1ba5e1 and ee5ae3a57dbbe835584f164c956e0374da1ed2eb
      
         Applies to STM32F4 and STM32F7
      
         Save elapsed time before handling I2C in stm32_i2c_sem_waitdone()
         It is possible that a context switch occurs after stm32_i2c_isr() call
         but before elapsed time is saved in stm32_i2c_sem_waitdone(). It is then
         possible that the handling code was executed only once with "elapsed
         time" equal 0. When scheduler resumes this thread it is quite possible
         that now "elapsed time" will be well above timeout threshold. In that
         case the function returns and reports a timeout, even though the
         handling code was not executed "recently".
         Fix this by inverting the order of operations in the loop - save elapsed
        time before handling I2C. This way a context switch anywhere in the loop
        will not cause an erroneous "timeout" error.
      60c8c84e
    • José Roberto de Souza's avatar
      07921c9f
    • José Roberto de Souza's avatar
      modules: dataman: Add a ram_flash backend · e2aae04c
      José Roberto de Souza authored
      This backend will keep all updated data in RAM and
      persist the data between reboots using flash memory.
      
      Using only flash memory would result in a slow backend that
      would decrease the lifetime of the flash memory, using both
      we can reduce the several cycles of erase & write into flash
      and keep the performance of the backend almost as fast
      as the RAM only backend.
      
      Note: Do not use this backend on a sector from the same flash memory
      bank as the memory bank that STM32 read instructions or it can block
      the CPU from fetching instructions from flash during the erase and
      write operations and cause your drone crash.
      e2aae04c
    • José Roberto de Souza's avatar
      modules: flashparams: Change size to uint32_t · 75e7cfcb
      José Roberto de Souza authored
      So flash sector of 64Kbyes and 128Kbytes can also be used.
      75e7cfcb
    • José Roberto de Souza's avatar
    • José Roberto de Souza's avatar
      modules: dataman: Share memory between backends · 66d9d565
      José Roberto de Souza authored
      Also having just a boolean to track if backend is running.
      66d9d565
    • Beat Küng's avatar
      tap-v1 NuttX defconfig: lower CONFIG_DEV_PIPE_SIZE to 70 · 8d5ba636
      Beat Küng authored
      This saves almost 2kb of RAM when using the mavlink shell. 70 matches the
      size of the mavlink message. Since the pipe is blocking, a process writing
      a lot of data will just wait, data will not be dropped.
      
      The mavlink shell is the only process creating a pipe.
      8d5ba636
    • Beat Küng's avatar
      px4nucleoF767ZI-v1 NuttX defconfig: lower CONFIG_DEV_PIPE_SIZE to 70 · 374dc1be
      Beat Küng authored
      This saves almost 2kb of RAM when using the mavlink shell. 70 matches the
      size of the mavlink message. Since the pipe is blocking, a process writing
      a lot of data will just wait, data will not be dropped.
      
      The mavlink shell is the only process creating a pipe.
      374dc1be
    • Beat Küng's avatar
      px4fmu-v5 NuttX defconfig: lower CONFIG_DEV_PIPE_SIZE to 70 · d25218eb
      Beat Küng authored
      This saves almost 2kb of RAM when using the mavlink shell. 70 matches the
      size of the mavlink message. Since the pipe is blocking, a process writing
      a lot of data will just wait, data will not be dropped.
      
      The mavlink shell is the only process creating a pipe.
      d25218eb
    • Beat Küng's avatar
      px4fmu-v4pro NuttX defconfig: lower CONFIG_DEV_PIPE_SIZE to 70 · 38484323
      Beat Küng authored
      This saves almost 2kb of RAM when using the mavlink shell. 70 matches the
      size of the mavlink message. Since the pipe is blocking, a process writing
      a lot of data will just wait, data will not be dropped.
      
      The mavlink shell is the only process creating a pipe.
      38484323
    • Beat Küng's avatar
      px4fmu-v4 NuttX defconfig: lower CONFIG_DEV_PIPE_SIZE to 70 · 1f520f15
      Beat Küng authored
      This saves almost 2kb of RAM when using the mavlink shell. 70 matches the
      size of the mavlink message. Since the pipe is blocking, a process writing
      a lot of data will just wait, data will not be dropped.
      
      The mavlink shell is the only process creating a pipe.
      1f520f15
    • Beat Küng's avatar
      px4fmu-v3 NuttX defconfig: lower CONFIG_DEV_PIPE_SIZE to 70 · b73cd508
      Beat Küng authored
      This saves almost 2kb of RAM when using the mavlink shell. 70 matches the
      size of the mavlink message. Since the pipe is blocking, a process writing
      a lot of data will just wait, data will not be dropped.
      
      The mavlink shell is the only process creating a pipe.
      b73cd508
    • Beat Küng's avatar
      px4fmu-v2 NuttX defconfig: lower CONFIG_DEV_PIPE_SIZE to 70 · b89451f1
      Beat Küng authored
      This saves almost 2kb of RAM when using the mavlink shell. 70 matches the
      size of the mavlink message. Since the pipe is blocking, a process writing
      a lot of data will just wait, data will not be dropped.
      
      The mavlink shell is the only process creating a pipe.
      b89451f1
    • Beat Küng's avatar
      px4fmu-v1 NuttX defconfig: lower CONFIG_DEV_PIPE_SIZE to 70 · 0ffcf70a
      Beat Küng authored
      This saves almost 2kb of RAM when using the mavlink shell. 70 matches the
      size of the mavlink message. Since the pipe is blocking, a process writing
      a lot of data will just wait, data will not be dropped.
      
      The mavlink shell is the only process creating a pipe.
      0ffcf70a
    • Beat Küng's avatar
      stm32f4discovery NuttX defconfig: lower CONFIG_DEV_PIPE_SIZE to 70 · 58aff849
      Beat Küng authored
      This saves almost 2kb of RAM when using the mavlink shell. 70 matches the
      size of the mavlink message. Since the pipe is blocking, a process writing
      a lot of data will just wait, data will not be dropped.
      
      The mavlink shell is the only process creating a pipe.
      58aff849
Loading