DAP - Debug access port flexibility

I am new to the nRF52840 and the whole Nordic environment, so this may be a pretty basic question. I couldn't find any other blog entries that fit.

I am developing a manufacturing PCBA level test for a nRF52840 based product. We are developing custom firmware for this mfg test. The only port that I have access to without building a bed-of-nails fixture is the  DAP - Debug access port.

Can the  DAP - Debug access port be configured as a standard serial or I2C port, etc.? Can I send commands over this port and get responses back if my firmware supports that?

I'm not sure of the restrictions on using the  DAP - Debug access port, and reading the documentation and web searches have not answered this question.

Thanks so much for your help.

Parents
  • Hi,

    From the product specification:

    The debug access port (DAP) implements a standard ARMRegistered CoreSightTm serial wire debug port (SW-DP), which implements the serial wire debug protocol (SWD). SWD is a two-pin serial interface, see SWDCLK and SWDIO in Debug and trace overview.

    The SWDCLK and SWDIO pins does not have GPIO functionality, as you can see in Pin assignments. These pins can therefore not be used for standard serial or I2C ports.

    The DAP/SWD can support things like reading/writing memory (Flash/RAM/peripheral registers, etc) and control the CPU. We provide support for Segger RTT, which works similar to a serial interface to the chip over the SWD interface. This can be used as a backend for the Zephyr Shell to send and received commands to and from the device, or for the Logger module to receive logs from the device.

    Best regards,
    Jørgen

  • Hi Jørgen,

     Thank you for the quick response. I do have a few additional questions.

     I have had to do a bit of reading to make sense of your response; I’ve been a LabView developer in test environments for the past 15 years so much of this is quite new for me.

     As some background, we have a product based on the nRF52840. My desire is to attach some type of external host for program control to this product, and from this host send commands to the nRF52840 to access and control the on-board peripherals of the product that are attached to the nRF52840. I hope this is making sense.

     I was hoping that there was a more generic connection available to the nRF52840 so that I wasn’t restricted to some type of debug device, but instead could use a PC running LabView, or a Raspberry Pi, Arduino, etc. I see that isn’t the case.

     It appears that the most practical solution would be to use the nRF52840-DK (dev kit) and communicate via the AHB access port. So, my question is, would this method give me enough control to access all the on-board peripherals attached to the nRF52840.

     Also, what flexibility/capabilities would Zephyr add for this project? And, would that still be compatible with the debug port?

     I appreciate all your help on this and your patience while I come up to speed.

     Have a great day.

     Tusen Takk

    Dayle Swensen

  • Hi,

    Deepspace said:
    As some background, we have a product based on the nRF52840. My desire is to attach some type of external host for program control to this product, and from this host send commands to the nRF52840 to access and control the on-board peripherals of the product that are attached to the nRF52840. I hope this is making sense.

    This should be possible. Can you elaborate a bit more on which on-board peripherals you want to control?

    Deepspace said:
    I was hoping that there was a more generic connection available to the nRF52840 so that I wasn’t restricted to some type of debug device, but instead could use a PC running LabView, or a Raspberry Pi, Arduino, etc. I see that isn’t the case.

    It might be possible to use something like a Raspberry Pi with OpenOCD to achieve this, it looks like it supports RTT. We do not provide support for this, but OpenOCD should have support for Nordic chips.

    Deepspace said:
     It appears that the most practical solution would be to use the nRF52840-DK (dev kit) and communicate via the AHB access port. So, my question is, would this method give me enough control to access all the on-board peripherals attached to the nRF52840.

    This depends a bit on what you are referring to by "all the on-board peripherals". You get access to the memory of the device and can read/write peripheral registers, but it might make more sense to write application firmware running on the device that handles the communication with the peripherals based on commands sent over the SWD interface to a shell or command line interface.

    Deepspace said:
     Also, what flexibility/capabilities would Zephyr add for this project?

    The previously linked Shell available in Zephyr is quite powerful already, and can be extended with additional custom commands for your specific use-cases.

    Deepspace said:
    And, would that still be compatible with the debug port?

    Yes, the SWD port can be used for debugging and RTT/shell based on what application connects to it.

    Best regards,
    Jørgen

Reply
  • Hi,

    Deepspace said:
    As some background, we have a product based on the nRF52840. My desire is to attach some type of external host for program control to this product, and from this host send commands to the nRF52840 to access and control the on-board peripherals of the product that are attached to the nRF52840. I hope this is making sense.

    This should be possible. Can you elaborate a bit more on which on-board peripherals you want to control?

    Deepspace said:
    I was hoping that there was a more generic connection available to the nRF52840 so that I wasn’t restricted to some type of debug device, but instead could use a PC running LabView, or a Raspberry Pi, Arduino, etc. I see that isn’t the case.

    It might be possible to use something like a Raspberry Pi with OpenOCD to achieve this, it looks like it supports RTT. We do not provide support for this, but OpenOCD should have support for Nordic chips.

    Deepspace said:
     It appears that the most practical solution would be to use the nRF52840-DK (dev kit) and communicate via the AHB access port. So, my question is, would this method give me enough control to access all the on-board peripherals attached to the nRF52840.

    This depends a bit on what you are referring to by "all the on-board peripherals". You get access to the memory of the device and can read/write peripheral registers, but it might make more sense to write application firmware running on the device that handles the communication with the peripherals based on commands sent over the SWD interface to a shell or command line interface.

    Deepspace said:
     Also, what flexibility/capabilities would Zephyr add for this project?

    The previously linked Shell available in Zephyr is quite powerful already, and can be extended with additional custom commands for your specific use-cases.

    Deepspace said:
    And, would that still be compatible with the debug port?

    Yes, the SWD port can be used for debugging and RTT/shell based on what application connects to it.

    Best regards,
    Jørgen

Children
No Data
Related