No luck with SWV component on PSoC 5

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hi.

I'm trying to use Cypress SWV component but it doesn't seem to work.

There is nothing to define in it, but nothing comes out of the SWV output (I've checked with oscilloscope) while using printf() function.

Did anyone manage to make it work?

Thanks.

10 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Sorry, language barrier: What stands "SWV" for?

Can you please post your complete project so that we all can have a look at all of your settings. To do so, use

Creator->File->Create Workspace Bundle (minimal)

and attach the resulting file.

Bob

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Hi.

I can't post you my project, but I've attached the component's library I'm trying to use. Don't remember where I downloaded it from, but it comes with Cypress datasheet.

0 Likes

@Bob:

SWV is single wire viewer. Mainly used for output of debug messages. Please take a further look here:

ARM Information Center

@Michael:

is SWV enabled in system settings?

Regards

0 Likes
Anonymous
Not applicable

I've set "Debug Select" to SWD+SWV.

Is that what you mean?

0 Likes

Yes, that's correct.

Hmmm... ah, another thing to check: what's your heap size? Since you revised the _write function, I assume you want to use printf() function, which uses dynamic memory allocation. If you're on the default setting (128 bytes) for the heap, that might be too little space.

Regards

0 Likes

@Michael

Did you have success with SWV ?

0 Likes
Anonymous
Not applicable

Hi.

I've increased the heap to 1KB. Still nothing.

0 Likes

Hi Michael,

maybe it would help if you can provide a minimal project, which reflects your current setup. Is anything else connected to the SWV pin except the Miniprog3?

Regards

0 Likes
Anonymous
Not applicable

Hi.

Nothing else is connected to it.

I tried to disconnect the Miniprog3 and look at the SWV pin with oscilloscope - didn't see any activity on the pin.

Does this component work on your project?

0 Likes

Hi Michael,

currently I've no hardware ready to try. I'll try to do a test. #Update: I've made a test with the implementation of Chris Youngs C# terminal application from the links below. The good news: It's working in general. The bad news: Characters are missing. I'm investigating what happens, currently it seems that the selected speed affects the communication.

#EndUpdate

However, I found two threads regarding PSoC and SWV debugging/console:

Serial Console Debug (SWV on PSoC3 and PSoC5LP)

Real Time Trace: SWV(Serial wire viewer) in PSoC3

Maybe those can help you to figure out where the error is. Please keep us updated.

Regards