Skip to content
Snippets Groups Projects
  1. Feb 07, 2019
  2. Feb 06, 2019
  3. Feb 05, 2019
  4. Feb 04, 2019
  5. Feb 01, 2019
  6. Jan 31, 2019
    • Yegor Yefremov's avatar
      cpu/stm32_common: add support for uart_mode routine · 60f745a0
      Yegor Yefremov authored
      
      Add support for specifying data bits, stop bits and parity at
      runtime.
      
      Introduce feature periph_uart_modecfg for uart_mode() till all
      other CPUs implement it.
      
      STM32 L1, F1, F2, F4 supports following modes:
      
      * 7E1, 7E2
      * 7O1, 7O2
      * 8N1, 8N2
      * 8E1, 8E2
      * 8O1, 8O2
      
      STM32 L0, L4, F0, F3, F7 supports following modes:
      
      * 6E1, 6E2
      * 6O1, 6O2
      * 7E1, 7E2
      * 7O1, 7O2
      * 7N1, 7N2
      * 8N1, 8N2
      * 8E1, 8E2
      * 8O1, 8O2
      
      Use USART_CR1_M1 macro to detect 7-bit support because
      even inside one family there could be devices that don't
      support 7-bit mode. So just using a family macro is not
      enough.
      
      As stated in the datasheets for L0, L4, F0, F3, F7 devices,
      data bits can only be changed when UART is disabled (UE=0).
      Introduce uart_stop() routine to satisfy this requirement.
      
      STM32 UART adds parity to the MSB of a byte to send. The same
      also applies to the received bytes. As a result this bit must
      be masked in order to get the pure data.
      
      Signed-off-by: default avatarYegor Yefremov <yegorslists@googlemail.com>
      60f745a0
  7. Jan 30, 2019
  8. Jan 29, 2019
  9. Jan 28, 2019
    • Kaspar Schleiser's avatar
      cpu/native: fix race condition in thread_yield_higher() · 62bb4cc5
      Kaspar Schleiser authored
      Error case:
      1. thread_yield_higher() stores the thread's ucontext
      2. creates an "isr ucontext" for isr_thread_yield, switches to it
      
      Case 1: no signals are pending, continues in isr_thread_yield()
      3a. sched_run is called
      4a. return to sched_active_thread ucontext
      
      Case 2: signals pending (the crashing scenario), continues in native_irq_handler()
      3b. handles signals
      4b. if sched_context_switch_request is set, call sched_run
      5b. return to sched_active_thread ucontext
      
      4b misses the call to sched_run(), leading to a possible return into a
      non-ready thread.
      62bb4cc5
  10. Jan 27, 2019
  11. Jan 26, 2019
  12. Jan 25, 2019
  13. Jan 24, 2019
Loading