cancel
Showing results for 
Search instead for 
Did you mean: 

Need FSMC Help for nWAIT input

design5
Associate II
Posted on August 13, 2009 at 23:30

Need FSMC Help for nWAIT input

2 REPLIES 2
design5
Associate II
Posted on May 17, 2011 at 13:20

Hi Fellow Programmers and ST Support:

I need some help with FSMC, especially with the nWAIT input from Flash Memory.

I have the FSMC working, following the code from the STM3210E-Eval Kit firmware, but I don't know how the nWAIT input (Port D pin 6) is used. If anybody knows anything about this, I would appreciate some help.

Here is a summary of my confusion:

1. the nWAIT input has a 10K pullup to 3.3v

2. the Flash Ready/Busy signal is connected to nWAIT

3. the Eval Kit code does not program GPIO for nWAIT

4. the Eval Kit code polls PD6 input during programming for busy testing

5. the FSMC interface can use nWAIT to automatically delay cycles

6. to use the FSMC_NWAIT signal, I think the GPIO needs to be as ''AF_OD''

7. also on the external bus, I have an LCD Solomon module with nWAIT

8. to work with the LCD, nWAIT needs to be programmed with FSMC for ''AF_OD''

9. but, to work with Flash, nWAIT needs to be Floating or ''IPU''

So, me qestions become: How should the GPIO pin 6 Port D be programmed? Should it be ''IPU'', meaning that the LCD auto delay may not work? Should it be ''AF_OD'' meaning that the Flash busy polling may not work?

There is a serious lack of documentation for the FSMC, so using it appears to be by trial and error.

Any help would be appreciated.

Thanks,

Garry.

design5
Associate II
Posted on May 17, 2011 at 13:20

Hi Fellow Programmers:

My trial and error produced the follow results. Hope it helps others:

The FSMC Pin D6 (for nWAIT control) should be left as GPIO floating or IPU. Any other setting creates problems.

Somehow, the FSMC manages to use this setting as an alternate function input even though it defaults to a GPIO function.

I recommend an external pull-up resistor with a value between 1K0 and 3K3. Any larger resistance is too slow for recovery after nWAIT is released.

Now that I have FSMC working, I think I may even understand how it works.

Happy programming,

Garry.