You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by je...@apache.org on 2022/03/07 18:41:20 UTC

[mynewt-core] branch master updated (bb6aac2 -> 43f53ee)

This is an automated email from the ASF dual-hosted git repository.

jerzy pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git.


    from bb6aac2  bsp/p-nucleo-wb55: Fill hal_bsp_deinit function
     new 76765e7  tinyusb: Fix USB D+ external pull-up for bootloader
     new 43f53ee  bsp/black_vet6: Set USB_DP_HAS_EXTERNAL_PULL_UP to 1

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 hw/bsp/black_vet6/syscfg.yml                 | 2 ++
 hw/usb/tinyusb/stm32_fsdev/src/stm32_fsdev.c | 4 ++++
 hw/usb/tinyusb/synopsys/src/synopsys.c       | 4 ++++
 3 files changed, 10 insertions(+)

[mynewt-core] 02/02: bsp/black_vet6: Set USB_DP_HAS_EXTERNAL_PULL_UP to 1

Posted by je...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jerzy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git

commit 43f53eedb919acb5e59c811609153cfdb4e9ff1e
Author: Jerzy Kasenberg <je...@apache.org>
AuthorDate: Sat Mar 5 11:59:07 2022 +0100

    bsp/black_vet6: Set USB_DP_HAS_EXTERNAL_PULL_UP to 1
    
    Black_vet6 boards have D+ line with external pullup.
    To handle software resets this line needs to go down.
    This sets up USB_DP_HAS_EXTERNAL_PULL_UP to 1 so application
    or target does not have to specify this.
---
 hw/bsp/black_vet6/syscfg.yml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/hw/bsp/black_vet6/syscfg.yml b/hw/bsp/black_vet6/syscfg.yml
index 3fe20e1..eaf2501 100644
--- a/hw/bsp/black_vet6/syscfg.yml
+++ b/hw/bsp/black_vet6/syscfg.yml
@@ -108,3 +108,5 @@ syscfg.vals:
     TIMER_0_TIM: 'TIM2'
     TIMER_1_TIM: 'TIM3'
     TIMER_2_TIM: 'TIM4'
+
+    USB_DP_HAS_EXTERNAL_PULL_UP: 1

[mynewt-core] 01/02: tinyusb: Fix USB D+ external pull-up for bootloader

Posted by je...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jerzy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git

commit 76765e78de75bd045b226d68d1caa5d3cb2bb86d
Author: Jerzy Kasenberg <je...@apache.org>
AuthorDate: Sat Mar 5 11:56:57 2022 +0100

    tinyusb: Fix USB D+ external pull-up for bootloader
    
    stm32_fsdev for STM32F1 requires external pull-up on D+.
    Later other ST products with same USB IP core may not need it
    but it happens that boards do have those solder in.
    
    for synopsys external pull-up is not needed but some boards do
    have them for no real reason.
    
    Mynewt code can handle those external pull-ups if reset
    is performed to notify host about reset.
    
    While code was OK for application running in OS os_time_delay()
    used for keeping D+ line down is not working in bootloader.
    Now for bootloader os_cput_time_delay is used.
---
 hw/usb/tinyusb/stm32_fsdev/src/stm32_fsdev.c | 4 ++++
 hw/usb/tinyusb/synopsys/src/synopsys.c       | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/hw/usb/tinyusb/stm32_fsdev/src/stm32_fsdev.c b/hw/usb/tinyusb/stm32_fsdev/src/stm32_fsdev.c
index a0f82af..593ee75 100755
--- a/hw/usb/tinyusb/stm32_fsdev/src/stm32_fsdev.c
+++ b/hw/usb/tinyusb/stm32_fsdev/src/stm32_fsdev.c
@@ -55,8 +55,12 @@ tinyusb_hardware_init(void)
      */
 #if MYNEWT_VAL(USB_DP_HAS_EXTERNAL_PULL_UP)
     hal_gpio_init_out(MCU_GPIO_PORTA(12), 0);
+#if MYNEWT_VAL(BOOT_LOADER)
+    os_cputime_delay_usecs(1000);
+#else
     os_time_delay(1);
 #endif
+#endif
     hal_gpio_init_af(MCU_GPIO_PORTA(12), 0, GPIO_NOPULL, GPIO_MODE_AF_PP);
 
     /*
diff --git a/hw/usb/tinyusb/synopsys/src/synopsys.c b/hw/usb/tinyusb/synopsys/src/synopsys.c
index 6bcaf1e..69ce4ee 100755
--- a/hw/usb/tinyusb/synopsys/src/synopsys.c
+++ b/hw/usb/tinyusb/synopsys/src/synopsys.c
@@ -44,8 +44,12 @@ tinyusb_hardware_init(void)
     hal_gpio_init_af(MCU_GPIO_PORTA(11), GPIO_AF10_OTG_FS, GPIO_NOPULL, GPIO_MODE_AF_PP);
 #if MYNEWT_VAL(USB_DP_HAS_EXTERNAL_PULL_UP)
     hal_gpio_init_out(MCU_GPIO_PORTA(12), 0);
+#if MYNEWT_VAL(BOOT_LOADER)
+    os_cputime_delay_usecs(1000);
+#else
     os_time_delay(1);
 #endif
+#endif
     hal_gpio_init_af(MCU_GPIO_PORTA(12), GPIO_AF10_OTG_FS, GPIO_NOPULL, GPIO_MODE_AF_PP);
 
     /*