1. 02 Feb, 2021 4 commits
    • Andrew Leech's avatar
      stm32/mboot: Change debug compiler optimisation from -O0 to -Og. · 5ef71cd1
      Andrew Leech authored
      With mboot encrpytion and fsload enabled, the DEBUG build -O0 compiler
      settings result in mboot no longer fitting in the 32k sector.  This commit
      changes this to -Og which also brings it into line with the regular stm32
      build.
      5ef71cd1
    • Damien George's avatar
      stm32/usbd_cdc_interface: Don't wait in usbd_cdc_tx_always if suspended. · 7be1f779
      Damien George authored
      MCUs with device-only USB peripherals (eg L0, WB) do not implement (at
      least not in the ST HAL) the HAL_PCD_DisconnectCallback event.  So if a USB
      cable is disconnected the USB driver does not deinitialise itself
      (usbd_cdc_deinit is not called) and the CDC driver can stay in the
      USBD_CDC_CONNECT_STATE_CONNECTED state.  Then if the USB was attached to
      the REPL, output can become very slow waiting in usbd_cdc_tx_always for
      500ms for each character.
      
      The disconnect event is not implemented on these MCUs but the suspend event
      is.  And in the situation where the USB cable is disconnected the suspend
      event is raised because SOF packets are no longer received.
      
      The issue of very slow output on these MCUs is fixed in this commit (really
      worked around) by adding a check in usbd_cdc_tx_always to see if the USB
      device state is suspended, and, if so, breaking out of the 500ms wait loop.
      This should also help all MCUs for a real USB suspend.
      
      A proper fix for MCUs with device-only USB would be to implement or somehow
      synthesise the HAL_PCD_DisconnectCallback event.
      
      See issue #6672.
      Signed-off-by: default avatarDamien George <damien@micropython.org>
      7be1f779
    • Tim Radvan's avatar
      examples/rp2: Add pio_uart_rx.py example. · 3ea05e49
      Tim Radvan authored
      This was adapted from the `pio/uart_rx` example from the `pico-examples`
      repository:
      https://github.com/raspberrypi/pico-examples/blob/master/pio/uart_rx/uart_rx.pio
      
      It demonstrates the `jmp_pin` feature in action.
      Signed-off-by: default avatarTim Radvan <tim@tjvr.org>
      3ea05e49
    • Tim Radvan's avatar
      rp2/rp2_pio: Add JMP PIN support for PIO. · 7a9027fd
      Tim Radvan authored
      PIO state machines can make a conditional jump on the state of a pin: the
      `JMP PIN` command.  This requires the pin to be configured with
      `sm_config_set_jmp_pin`, but until now we didn't have a way of doing that
      in MicroPython.
      
      This commit adds a new `jmp_pin=None` argument to `StateMachine`.  If it is
      not `None` then we try to interpret it as a Pin, and pass its value to
      `sm_config_set_jmp_pin`.
      Signed-off-by: default avatarTim Radvan <tim@tjvr.org>
      7a9027fd
  2. 01 Feb, 2021 6 commits
  3. 31 Jan, 2021 2 commits
  4. 30 Jan, 2021 15 commits
  5. 29 Jan, 2021 13 commits