Announcements
IMPORTANT: Cypress Developer Community is transitioning on October 20th. To learn more and be prepared for this change, check out our latest announcement.
cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 5, 3 & 1 MCU

Anonymous
Not applicable

 Hey PSOC Community!

   

 

   

I have started writing a driver for my first Async Flash Memory Chip, it features 2 8-bit busses, one for control signals and the other for IO.

   

I have not had any trouble thus far with the control signals, but I have been having some problems with using the bi-directional IO. Namely, I really am not sure how I should configure the IO port. I am not having any problems writing out over it, but when I should be expecting input from the flash chip from it's ID register, I'm getting nothing.

   

There seem to be a few options as far an configuring the port under the general settings, digital in/out, or I could choose bi-directional. The drive mode is the part that is giving me the most problems, there are quite a few options and I don't really know how to pick the correct one. I have tried experimenting quite a bit trying to find the right one, but at this point I feel like it would be best to really understand what is going on.

   

I have read through the application notes and data sheets regarding the GPIO, I think what is stumbling me now, is that I am having a hard time figuring out from the data sheet how the flash chip is supposed to be driving the PSOC's pins when the flash chip is in output mode.

   

Also, as an added note, I am providing my own voltage for Vddi0, the chip has a supply of 1.8v which I am also giving to Vddio, which is serving as the supply for ports 4 and 0. I am assuming that it will consider 1.8v as the max logic level on these two ports and not 3.3v in this configuration.

   

I really appreciate any guidance or help that you guys can provide, I have learned quite a bit from here so far!

0 Likes
5 Replies
Bob_Marlowe
Expert II

Configuring a pin for input AND output needs the oe (output enable) feature. the reason is: Reading from the pin would deliver the voltage driven BY the pin if the output is enabled. So you need some logic from or to extern that tells the PSoC or the connected device that data should be placed on the port (oe high) and that data my be read from port (oe low).

   

The drive mode the port uses is not relevant, I would always use "strong" as long as it is not a bus that uses pull-ups or so.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

 Bob,

   

How would this compare to switching the pin drive mode in software between Strong Drive and Hi Impedence Digital? Is it equivlent only slower, or is there something fundamentally different about it?

   

 

   

Thanks!

0 Likes
Bob_Marlowe
Expert II

The switching of the drive mode can only be done in software, while using output enable can be done in hardware and when using a control-register in software,too. Additionally this is a quite usual way for i/o configuration.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

 Thanks Bob, that answered my question there!

0 Likes
Bob_Marlowe
Expert II

You are always welcome!

   

 

   

Bob

0 Likes