Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > PSoC® 5 > Strange problems when sampling GPIO ports

Bookmark and Share
Cypress Developer CommunityTM
Forums | Videos | Blogs | Training | Rewards Program | Community Components



Strange problems when sampling GPIO ports
Moderator:
ANCY

Post Reply
Follow this topic



Strange problems when sampling GPIO ports

hli posted on 11 Apr 2011 3:20 PM PST
Top Contributor
675 Forum Posts

For my PSoC challenge project, I need to sample a GPIO port (to have a logic analyzer). I encountered some strange behaviors when doing that. I'm using a combination of LUTs for the trigger logic, which are driven by 2 registers (one for the bit mask, one for the compare values). My test circuit is a 8-bit-counter, running with about 6 kHz. The port I'm trying to sample is P3 (since it is available on the prototyping area).

My first version was using DMA for the GPIO data to memory. When doing so, only the bits which are not selected for trigger comparision are transferred properly - all other bits are set to the trigger compare value. To make it even more strange - the counter output seems to be distributed to the non-masked bits (meaning the the first bit not selected for trigger gets counter Q0, the second non-selected gets Q1 and so on) - which clearly isn't how I have connected the wires.

When I replace all the DMA logic with just a simple PWM timer to generate interupts, and sample via a Port_Read() call, these problems go away, but all bits are inverted.

In both cases I have routed the internal signals back to another port, and connected another logic analyzer. These signals are always fine (not inverted, not mixed up).

Has someone an idea what might happen here?




Re: Strange problems when sampling GPIO ports

Gautam Das posted on 12 Apr 2011 10:37 PM PST
Cypress Employee
742 Forum Posts

Hi hli,

 

Can you please attach the project so that I can try it out at my end.

As of now, I am unable to figure out the cause of error.

 



Re: Strange problems when sampling GPIO ports

hli posted on 12 Apr 2011 01:17 AM PST
Top Contributor
675 Forum Posts

I have uploaded the projects as hendriklipka.de/misc/adm_scope_DMA.Bundle01.zip and hendriklipka.de/misc/adm_scope_noDMA.Bundle01.zip . They include the complete project, the logic analyzer client and my documentation (as I had it written for the contest). If you have any question on how to operate it, don't hesitate to ask me directly.

Thanks,

hli



Re: Strange problems when sampling GPIO ports

Sakamuri posted on 12 Apr 2011 01:10 PM PST
Member
3 Forum Posts

 Hey,

Any have idea about USBUART in PSOC Design?

I am learning programming on PSOC Design 5.1.

I Have small doubt regarding USB interface?

How can I inerface PSOC with USB as COM port?

I tried to include  USBUART user module somponent as a project dependencies?

is it possible to add as a dependencies to my project?

 

My goal to to communicate the PSOC with LABVIEW on PC through USB : Is is sounds good?

Please your answer will help me a lot to move forward.

thanks in advance :)

 

Regards, 

Srinivas.

 






ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Spec No: None; Sunset Owner: KXP; Secondary Owner: VWA; Sunset Date: 01/01/20