Tell me more ×
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It's 100% free, no registration required.

I have a PSRAM driven by an STM32. One of the timing options for the STM32 is the bus turnaround FSMC_BusTurnAroundDuration. The ARM reference manual (see page 1250) says:

These bits are written by software to insert the bus turnaround delay after a read access only from multiplexed NOR Flash memory to avoid bus contention if the controller needs to drive addresses on the databus for the next side-by-side transaction.

Now my PSRAM is not NOR Flash and does not multiplex the data and address lines, so I assumed that FSMC_BusTurnAroundDuration is a "don't care" in my case. However, when I set

FSMC_BusTurnAroundDuration = 0;

then the ARM crashes. Any value between 1 and 15 doesn't crash the ARM.

Why is the bus turn around duration relevant for my PSRAM?

share|improve this question
The ARM reference manual doesn't have info on the FSMC bus, but the STM32 reference manual does. st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/… – Mark Lakata Nov 2 '12 at 0:54

2 Answers

up vote 3 down vote accepted
+50

You do not seem to have linked to the correct document, as your linked document doesn't have a page 1250. Nonetheless, I can guess the general nature of what is happening. Generally, when an attempt is made to read a memory chip, the device performing the read will keep the read request active for an entire cycle. The memory chip will continue to output data as long as its read request is active, and for a short amount of time thereafter. If the next bus cycle is something other than a read of that memory chip, the memory chip may continue to output data during part of that next bus cycle. This may cause bus contention, resulting in excess current draw, and may also prevent the device which should be driving the bus from doing so successfully. Turnaround delays of various types are used to allow one device which is driving a bus to stop doing so before another device starts driving it.

I don't know whether the problem you're having with zero delay is caused by the above contention scenario in particular, since many systems have a number of situations in which contention could possibly occur. The general principle is the same for many of them, however.

share|improve this answer

Perhaps FSMC_BusTurnAroundDuration = 1 is the minimum latency for non-mux'd addressable data.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.