User Activity

I've connected SWDIO, SWDCLK, TRACESWO and NRST to the ST-LINKV2, but have no luck with trace functions. There is also a "Trace - no synchronization" message.Is there anything else I should be doing ?
I have a fairly simple bit of code running in a CubeMX generated scheme, using HAL code to communicate over SPI. I run a loopback test a thousand times - sometimes it passes, other times I get an INVSTATE Usage Fault which appears (according to Keil)...