No it is not that way. SLCS# and FLAGD are two alternative functions of PORTA.7 pin. PA.7 can either act as GPIO, or SLCS# or FLAGD, which can be configured using PORTACFG register.
PA.7 acts as FLAGD, if PORTACFG.7 = 1
PA.7 acts as SLCS# if PORTACFG.6 =1 and IFCONFIG1:0 =11
if both PORTACFG.7 and PORTCFG.6 = 0, then PA.7 acts as GPIO.
So, for using the PA.7 as FLAGD, keep PORTACFG.7 = 1; PORTACFG.6 = 0.
thanks a lot for your quick reply.
Yes, I see what you said.
but according to the data sheet, if SLCS# is not asserted, the chip is even not selected, and SLRD#， SLWR#, SLOE# etc is invalid.
a brief description of my application,
I want to use flaga~d as the fixed full/empty flag for endpoint 2,4,6,8, and master could monitor these flags to arbit when should send/receive data to/from the corresponding endpoint. but according to the data info, it seems I have no way to access all the 4 flags while keep 68013 selected. is this the case?
is there any other option for my implementation?
You need to assert SLCS# only when PA.7 is configured to function as SLCS#. In all other cases, you can ignore SLCS# and you can use that pin as FLAG D. FLAG D takes the priority over SLCS# even when both PORTACFG.6 and PORTACFG.7 are configured.
You can refer to the following application note that shows how an FPGA can perform read and write operations on the Slave FIFO interface of FX2LP.
Please let me know if you have any questions related to this application note.
Many thanks to Gayathri:)
so when PA.7 doesn't act as a chip select(slcs#), slrd#, slwr#, sloe# could also work without any issue? i.e, the chip is selected in this case?
it seems the link application gives the answer.