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

Test nRF51822 through SWD interface after programming (through RTT?)

After programming a panel of 6 modules embedding nRF51822, I would like to send some data in order to test some features. The basic idea is to validate the modules before cutting it from panel and mounting it in its final case. For example, I would like to light a led, start moving motors, etc...

Because I don't have any unused GPIO to use standard UART to do it, I was wondering if it could be possible to send data catchable by the chip trough SWD interface.

I heard about the J-Link RTT feature and it sounds promising, but it seems only possible to read/write register. My need would be to catch the data sent in the code (like with an UART) to execute behavior in order to test physical mounted pieces like motors.

Is it a way to send data to nRF51822 through SWD interface like UART?

Edit

The target of this test is to validate that complex component are well mounted on the PCB. It needs several little screw to make contact on the PCB and is a sensible part of the module. Of course, it is not as simple as toggle a GPIO to test this component because a specific frequency must be generated to test it, so I need to send command to the module to run the test.

Parents
  • As you and RK point out, RTT is an easy way of doing what you want. See this tutorial for how to set it up.

    You can read input from your host machine from anywhere in the code, using for example SEGGER_RTT_Read() or SEGGER_RTT_GetKey(). Note that these are non-blocking functions, so you could use them in combination with SEGGER_RTT_HasKey(), or use SEGGER_RTT_WaitKey() which blocks until you send a character.

    There is more information on the link you posted in your question, and some more in-depth details and examples in chapter 9 here

Reply
  • As you and RK point out, RTT is an easy way of doing what you want. See this tutorial for how to set it up.

    You can read input from your host machine from anywhere in the code, using for example SEGGER_RTT_Read() or SEGGER_RTT_GetKey(). Note that these are non-blocking functions, so you could use them in combination with SEGGER_RTT_HasKey(), or use SEGGER_RTT_WaitKey() which blocks until you send a character.

    There is more information on the link you posted in your question, and some more in-depth details and examples in chapter 9 here

Children
No Data
Related