How to configure the direction a mixed direction Port

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

cross mob
RuGl_1600761
Employee
Employee
25 replies posted 25 sign-ins 10 replies posted

I have a pin colection (number of pin= 😎 forming a 8 bit port on P0.0 to P.7. For this port is used as to interface my device in a byte way in one mode. My device also  allow to run with an SPI in serial mode. Here I have to configure the port each pin differently (input/output) to be able to connect as SPI. Each pin configuration needs 3 bit so for 8 bits this will end up in a uint32_t for configuration.

If I use each pin seperatly (number of pin =1 eight times), I will lose the possibility to write all 8 bits in one cycle... I have to generate a bif if / else construct for each bit of the byte, slowing down my write cycle.

I want to have a fast byte access and a fast bit access of each pin / port and I want to assign aome pins

case 1 to the SPI module and sone single control lines

case2 to 8 port bidirectional

and diong this in runtime.

 

Please tell me the name and the access posibility of this 32bit register. It would be great if you will publish all the information you are hiding how the peripheral exactly look (structure and register/flags names), how the register are named so I can use the controller bejond the methods you are offering in your API.

rgl
0 Likes
1 Solution
BiBi_1928986
Level 7
Level 7
First comment on blog 500 replies posted 250 replies posted

Hello.

The PSoC4 CY8C4245 registers are described in Cypress register TRM:
https://www.cypress.com/documentation/technical-reference-manuals/psoc-41004200-family-psoc-4-regist...

The architecture TRM for same device is:
https://www.cypress.com/documentation/technical-reference-manuals/psoc-41004200-family-psoc-4-archit...

This PSoC4 Pin description document shows the GPIO multiplexing structure in very good detail.
https://www.cypress.com/documentation/application-notes/an86439-psoc-4-using-gpio-pins

If you are using a different PSoC 4 family device (L, S, M), you can search Cypress website for similar documentation.

You'll need to determine the register settings.  The technical data is all there.

Good luck with your project.

View solution in original post

0 Likes
4 Replies
BiBi_1928986
Level 7
Level 7
First comment on blog 500 replies posted 250 replies posted

Hello.

The PSoC4 CY8C4245 registers are described in Cypress register TRM:
https://www.cypress.com/documentation/technical-reference-manuals/psoc-41004200-family-psoc-4-regist...

The architecture TRM for same device is:
https://www.cypress.com/documentation/technical-reference-manuals/psoc-41004200-family-psoc-4-archit...

This PSoC4 Pin description document shows the GPIO multiplexing structure in very good detail.
https://www.cypress.com/documentation/application-notes/an86439-psoc-4-using-gpio-pins

If you are using a different PSoC 4 family device (L, S, M), you can search Cypress website for similar documentation.

You'll need to determine the register settings.  The technical data is all there.

Good luck with your project.

0 Likes
RuGl_1600761
Employee
Employee
25 replies posted 25 sign-ins 10 replies posted

Thanks for the reply, this helps a lot.

I could not find these link here https://www.cypress.com/part/cy8c4247azi-l485

why not placing these link on the psoc device page in a way that user can easily find; with a small description what user will find using this link ..... 

Often things are listed on a page but user does not perceive it for the mind will be caught by other headlines ... it is not easy to generate a web page where all important information is perceived equally

rgl
0 Likes

Hello @RuGl_1600761 ,

You have some documents referenced under the Technical Documents section in the product webpage. The TRMs are referenced in the More Information section of the datasheet as shown below:

DheerajK_81_0-1615444863710.png

I agree it would be easier to have all of them in one place in the webpage. I will check with the internal team to see how we can make this possible. Appreciate the feedback 🙂

Regards,
Dheeraj

 

 

0 Likes

Hi DheerajK_81,

that's right, the important links are on second page on the "data sheet". It was my problem... I opened the data sheet scrolled down and found no really good information so I thought this file is nearly good for nothing.... I did not realize that the page with the links is the important page.... All silicon vendor I used in the past organized their on the page of the device... So I thought Cypress do it the same... but it is different. This data sheet could be improved if there is more detailed information about:

1) Debug Interface (not this hard to find entry in this table....)

2) Voltage domains and decoupling (not this small text) a little bit more

3) A real good pin table (see microchip devices as a refence)  The PIN table you offer could be improved.

4) How to connect a crystal (if available)

For me the TRMs are the real datasheet.

Regards

RuGl

rgl
0 Likes