This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Using usb wakeup feature on nrf52840 while its also used as a serial port device. Using nrf5_sdk 16.0.0

Hello,

We are trying to use the usb wakeup feature while also using the usbd as a serial port (over usb).

The rwu is registered on initialization in our firmware using the:

app_usbd_class_rwu_register(class_cdc_acm); function call. 

At that point all serial port communication is flawless.  We have worked out a heart beat exchange between the devices to determine when the computer is suspended.

Once the computer is suspended we attempt to wake it up with:

app_usbd_wakeup_req(); function call.  This wakes up the computer fine but from that point on the serial port device stops receiving data.

If we unregister the rwu with : app_usbd_class_rwu_unregister(class_cdc_acm); function call after the computer wakes up, bidirectional communication is restored on the serial port device"

However the wakeup feature is no longer is able to wakeup the computer again even if the rwu is re-registerd. It seems the (usb serial port) enters an invalid state.

Three Questions

1) Can the rwu feature be dynamically registered and unregistered at runtime without any issues. (It seems to adversely affect the serial port operation)

2) Is there an api to allow us to determine whether the connected computer is suspended or awake?

3) Is there an implementation example for best practices where the usbd is used for both serial communication and wakeup feature.

Thank you

Parents
  • Hi 

    Unfortunately the developer most familiar with the RWU feature is out in vacation at the moment, but I will help you out as best I can in the mean time. 

    You say that unregistering rwu doesn't work properly, but have you tried to remove and append the CDC instance again?

    We have no examples showing how to use the remote wakeup feature unfortunately. 

    Best regards
    Torbjørn

Reply
  • Hi 

    Unfortunately the developer most familiar with the RWU feature is out in vacation at the moment, but I will help you out as best I can in the mean time. 

    You say that unregistering rwu doesn't work properly, but have you tried to remove and append the CDC instance again?

    We have no examples showing how to use the remote wakeup feature unfortunately. 

    Best regards
    Torbjørn

Children
No Data
Related