Cannot tell when a host PC has connected to the nRF52832DK

Hello. I'm using the nRF52832DK in a test fixture application. 

I need the embedded system to know when either:

- a PC has connected and disconnected to the main USB connector

- a PC host has opened and closed the serial Port of the nRF52832DK

The interface MCU and nRF52832DK are connected via UART utilizing HWFC. However, no amount of adjusting the code on the nRF52832DK can get these RTS/CTS lines to change state. I have my .dts node designed with hw-flow-control set for uart0. 

When I open the terminal using tio, I have tried different flow control settings as well. 

Are there any code samples that utilize HWFC on the nRF52832DK? I would expect these pin values (RTS/CTS) to change based on if a host is connected, yet everytime I probe them, they're 0V. 

Thanks,

Rob

Parents
  • Just to make sure that I understand you task correctly, 

    You want to make the nRF52832 register if there has been a connection or disconnection of the USB on the DK. 


    What SDK are you using?


    There is no easy way for the nRF52832 to know if something is connected to the USB as it itself does not have it, but it uses the onboard interface MCU to communicate converting UART to USB. 

    Using the nRF52840 or 833 that has USB built inn you could use USB CDC to detect this i belive. Might be more in line with what you want to do. 


    RTS should be asserted or deasserted depending on the state of the connection to see if there is any action so this should indicate that something is ready to listen, but it does not guarantee that the comport is opened\closed i belive. 
    CTS could maybe be used to check if USB is connected or not, but an alterative is to connect a GPIO to the VBUS here so you will see a signal here, but you will need to step down the voltage, can use a voltage divider to test. 

    You will need to implement something in SW here to get it working as I dont think there are any examples available here. 

    Regards,
    Jonathan

  • Hey  

    Your understanding of what I'm trying to do is correct. I'm using whatever SDK comes with Zephyr 4.1.

    I agree this would be simpler with the nRF52840, but we've built this test fixture with the 52832, and I'm surprised this is not possible. 

    The DK reference manual mentions that the mbed OB interface does not support HWFC through the virtual COM port. Do you know where I can find the .bin files needed to replace the interface firmware possibly with Segger J-Link OB? 

    Thanks,

    Rob 

Reply
  • Hey  

    Your understanding of what I'm trying to do is correct. I'm using whatever SDK comes with Zephyr 4.1.

    I agree this would be simpler with the nRF52840, but we've built this test fixture with the 52832, and I'm surprised this is not possible. 

    The DK reference manual mentions that the mbed OB interface does not support HWFC through the virtual COM port. Do you know where I can find the .bin files needed to replace the interface firmware possibly with Segger J-Link OB? 

    Thanks,

    Rob 

Children
Related