Skip to main content

USB CDC and USB Charging

1个月前

USB CDC and USB Charging

张贴了Subramanyan.95分 15回复
0旋转

你好,

I am working on custom hardware with Dialog's DA14695 bluetooth chip. I am using the ble_social_distancing_tag example to flash on my custom hardware.

我正在使用wira sdk 10.440.8.6。

我正在尝试启用USB,以便我可以通过USB串行终端发送一些命令。我已启用DG_CONFIGUSE_SYS_CHARGER和DG_CONFIGUSE_USB_ENUMERATER。如果我通过USB将我的硬件连接到PC,则不会检测到。只有我禁用DG_CONFIGUSE_SYS_CHARGER,我可以看到PC通过USB检测到我的硬件。

Also, if I have enabled dg_configUSE_USB_ENUMERATION and disabled dg_configUSE_SYS_CHARGER, the PC is able to detect it only once on boot up. If I detach the USB cable and attach it back to the PC, the device is not detected and Windows reports an error saying it is not able to get Device details.

我提到了链接http://lpccs-docs.dialog-semiconductor.com/um-b-092-da1469x_software_platform_reference/User_guides/User_guides.html#the-usb-framework

Also, I have tested with usb_cdc and usb_cdc_smsd which is working find. I think both _usb_cdc and usb_cdc_smsd don't have USB charging functionality implemented, so it works fine.

虽然BLE_SOCIAL_DISTANCT_TAG具有USB充值状态,但似乎会导致USB CDC解决方案的问题。

Any help regarding this is deeply appreciated.

Thanks and Regards,

Subbu

1个月前

PM_DIALOG.

Hi Subramanyan,

谢谢你的问题。我们有一个类似的问题来自你的同事,请参阅以下:

https://www.dialog-seminile.com/produ亚博电竞菠菜cts/bluetooth-low-energy?post_id=11735#tab-support_tab_content.

>>>虽然BLE_SOCIAL_DISTANCT_TAG具有USB充值,但似乎会导致USB CDC解决方案的问题。

所以,您是否将USB CDC从USB_CDC SDK项目导入BLE_SOCIAL_DISTANCT_TAG?

谢谢,PM_DIALOG.

1个月前

Subramanyan. 95分

Hi PM_Dialog,

I checked the answer provided to my colleague. So, from the answer, I gather that USB charging and USB enumeration should be able to exist and work side by side. There should be no issue.

我从USB-CDC项目导入了USB_CDC.c,并从BLE_SOCIAL_DISTANCT_TAG项目中删除了SUOUSB_CDC.C,因为我们不在USB上看固件更新。

通过将USB_CDC.C导入我的项目并启用USB充电,可以通过USB检测设备,我们可以打开串行终端以通过USB传输内容。我的理解是否正确?

Thanks and Regards,

Subramanyan.

1个月前

Subramanyan. 95分

Hi PM_Dialog,

如果我的前期帖子中提到的方法是正确的,我想和你一起检查。

With the ble_social_distancing_tag example, I am removing suousb_cdc.c and including usb_cdc.c (from usb_cdc project). The USB charging is also enabled.

这是为了使设备将设备连接到PC时,PC将识别设备作为USB设备并打开COM端口。使用此COM端口,我可以使用任何串行应用程序将任何内容或配置传输到设备。

如果我所做的应该工作或不起作用,请告诉我?

Thanks and Regards,

Subbu

1个月前

PM_DIALOG.

嗨,子巴,

让我检查一下,我会回复你。

谢谢,PM_DIALOG.

1个月前

Subramanyan. 95分

Hi PM_Dialog,

那挺棒的。如果可以检查附加并分隔USB设备功能,那将是很好的,因为如果我在BLE_Social_Distancing_tag项目上使用USB_CDC,那将是不起作用的。

如果我在ble_social_distancing_tag代码中使用usb_cdc和禁用USB充电,我会看到第一次(重置后),设备被PC检测为COM端口,我可以发送数据。

If I detach and attach it, I can no longer communicate to the device. I have not tried to debug it yet.

While you are checking this solution, if you can check this as well, that will be great.

I am using a custom board for testing and not the DA14695 development kit.

Thanks and Regards,

Subramanyan.

1个月前

PM_DIALOG.

嗨,子巴,

I'll escalate this question to our Team internally to check this out. I'll keep you posted on this.

谢谢,PM_DIALOG.

1个月前

PM_DIALOG.

嗨,子巴,

Please find below feedback from our Team internally.

SDK项目:/项目/ DK_APPS /功能/ USB_CDC

Please use the USB_CDC project as provided by the SDK and do the following modifications:

1.在custom_config_qspi.h中添加sys充电器 - 请参阅下面的差异文件:

项目/ dk_apps / features / usb_cdc / config / compy_config_qspi.h @@ -37,7 +37,7 @@ #define dg_configflash_power_down(0)+#define dg_configuse_sys_charger(1)#define dg_configuse_hw_trng(1)

2. Add the custom_config_charger.h in the config folder – see attached.

3.在system_init函数中添加Charer Init - 请参阅下面的差异文件:

/projects/dk_apps/features/usb_cdc/src/main.c @@ -21,6 +21,9 @@ #include "sys_power_mgr.h" #include "sys_watchdog.h" #include "sys_usb.h" +#include "sys_charger.h" +#include "custom_charging_profile.h" + #if dg_configUSE_WDOG __RETAINED_RW int8_t idle_task_wdog_id = -1; @@ -71,6 +74,7 @@ static void system_init(void *pvParameters) pm_sleep_mode_set(pm_mode_extended_sleep); sys_usb_init(); + sys_charger_init(&sys_charger_conf); /* the work of the SysInit task is done */ OS_TASK_DELETE(OS_GET_CURRENT_TASK());

它正在正确检测到这种变化。请您与您的定制董事会和Pro-DK一起测试此功能吗?

谢谢,PM_DIALOG.

附件 尺寸
step_2.png 21.41 KB.

1个月前

Subramanyan. 95分

Hi PM_Dialog,
谢谢。我会测试这个并让你知道。
Regards,
Subbu

4周前

PM_DIALOG.

嗨,子巴,

请在Pro-DK和您的定制董事会中测试这一点,让我知道。

Thansk, PM_Dialog

1个月前

Subramanyan. 95分

Hi PM_Dialog,

虽然我检查了USB_CDC更改,但在使用BLE_SOCIAL_DISTANCT_TAG示例时,我看到sys_usb_da1469x.c的sys_usb_process_detach()函数导致问题。在分离过程中调用此函数时,固件挂起。

如果USB枚举和USB充电已启用USB枚举和USB充电,您是否可以确认附加和分离USB,Sys_USB_Process_Attach()和Sys_USB_Process_Detach()正确工作?

我不确定如果sys_usb_process_att功能ach() and sys_usb_process_detach() are called in the usb_cdc example for me to compare the behavior.

Thanks and Regards,

Subbu

4周前

PM_DIALOG.

嗨,子巴,

Could you please run it in debug mode and share a screenshot showing where the code hangs?

您是否在ble_social_distancing_tag示例中完成了任何修改?

P.S.:由于这与USB CDC和更改功能无关(如初始帖子中所述),我建议为取消附加问题提出新的论坛票。这将有助于我们最佳追踪所有问题。

谢谢,PM_DIALOG.

4周前

Subramanyan. 95分

Hi PM_Dialog,

I will raise a separate ticket for the ble_social_distancing_tag detach issue.

On the USB_CDC, I did the changes ie enabling the charging functionality. I see it working intermittently.

当我重新启动设备时,它始终工作第一次,我能够将设备视为COM设备。

但是,在分离和附加时,我有时会看到Windows没有将设备显示为COM设备。再次,我有时说,因为当我重新启动并再次尝试它的工作时。分离和附加的工作正常,窗户能够识别它。我不确定原因是什么。

Thanks and Regards,

Subbu

accepted answer!

3个星期前

PM_DIALOG.

嗨,子巴,

那么,您是否需要在USB_CDC项目上进一步支持?您是否为BLE_SOCIAL_DISTANCT_TAG问题提出了新的票证?

谢谢,PM_DIALOG.

3个星期前

Subramanyan. 95分

Hi PM_Dialog,

谢谢你的详细回应。如果需要,我将进一步测试并提高单独的票证。

Thanks and Regards,

Subbu

3个星期前

PM_DIALOG.

嗨,子巴,

Thanks for the update. Please raise a new forum ticket if you have any follow up question regarding the SDT application.

谢谢,PM_DIALOG.