Skip to content
  1. May 27, 2016
    • Stefan Kolb's avatar
      This is a fix to a problem in the handling of the oneshot timer. Due to a... · d44ecbcf
      Stefan Kolb authored
      This is a fix to a problem in the handling of the oneshot timer. Due to a wrong assumption concerning the behavior directly after the start of the timer/counter the function sam_oneshot_cancel(…) calculates the wrong remaining time. The code assumes that the counter register is zero directly after the start of the timer, but this is not true. To start the time/counter a software trigger is invoked, this trigger starts the timer/count and sets the counter register to zero, but the reset of the counter register is not performed instantly. According to the datasheet: “The counter can be reset by a trigger. In this case, the counter value passes to zero on the next valid edge of the selected clock.” Thus the counter is set to zero between 0 and USEC_PER_TICK microseconds after the clock was started.
      
      In my fix I use the freerun count value to determine if at least one tick passed since the start of the timer and thus if the value of the oneshot counter is correct. I also tried to use the function up_timer_gettime(…) to achieve this but, at least if compiled with no optimization the problem vanishes without using the value of the function, the function call takes too long.
      
      Another problem treated in the fix is that if the oneshot timer/counter is canceled, we only know the remaining time with a precision of USEC_PER_TICK microseconds. This means the calculated remaining time is between 0 and USEC_PER_TICK microseconds  too long. To fix this I subtract one tick if the calculated remaining time is greater than one tick and otherwise set the remaining time to zero. By doing so the measured times are much more precise as without it.
      d44ecbcf
    • Gregory Nutt's avatar
      Costmetic update to some comments · 23f4f044
      Gregory Nutt authored
      23f4f044
    • Pierre-noel Bouteville's avatar
    • Pierre-noel Bouteville's avatar
      * fix a bug in crc computation for ms583730 · 41412d0c
      Pierre-noel Bouteville authored
      * implement POSIX read.
      41412d0c
    • Gregory Nutt's avatar
      EFM32, STM32, TIVA: Allow lower half driver to build if any ADC is selected. ... · 3d3b7b54
      Gregory Nutt authored
      EFM32, STM32, TIVA:  Allow lower half driver to build if any ADC is selected.  Should not depend on CONFIG_ADC.
      3d3b7b54
  2. May 26, 2016
  3. May 25, 2016