Breakpoint trigger code

Question: The renumerating examples for the AN2131 and FX all have code that sets the breakpoint to trigger on TD_Poll().What does this code do and is it necessary?

 

Answer:

In our renumerating examples we use this code in our initialization function TD_Init(), as a debugging aid. This serves to provide a visual indication to the user that the code has successfully downloaded and renumerated. If the download was not successful the code in TD_Poll() would not be executing and the user would not get the visual indication. The green BKPT/Monitor LED illuminating serves as the visual indication.

You can set this code to trigger on functions other than TD_Poll() to assist you with debugging. Because this code serves as a debugging aid, it is not necessary to include this code.