cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F427 FMC NBL0 NBL1

john239955_st
Associate III
Posted on May 30, 2015 at 14:27

Hi,

I an laying down some decode logic for 2 x 16 bit SRAMs using Chip Select NE1, by bus configured for 32 bits 12 address lines.

If I Write using address 0x60000000 the NBL0 and NBL1 signals are both low during the NE1 cycle.

If the address is odd i.e. A0 = 1 NBL0 and NBL1 produce 2 seperate pulses NBL1 at the begining of the NE1 cycle returning hign and then NBL1 goes low returning high at the end of the NE1 cycle.

This seems to make sense as write pulse occur during the 2 NBL cycles as explaine by Table 263 Ref Manual.

I do not understand why this is not produced when the Address is odd, A0 = 1.

My silicon is Rev 1 as I understand that some devices have had problems with FMC.

Any help would be appreciated.

Rds John W

6 REPLIES 6
john239955_st
Associate III
Posted on May 30, 2015 at 14:31

Sorry for error !

I do not understand why this is not produced when the Address is odd, A0 = 0.

Posted on May 31, 2015 at 17:49

I don't quite understand what's your problem, but maybe this will help: in the 16- and 32-bit SRAMs always a whole word (halfword, whatever) is addressed and transferred. The address thus lacks the less significant bits of a bytewise address. So, if you want to read say from a 32-bit SRAM a byte from bytewise address 0x4321, you put 0x10C8 onto the address bus, read in the whole word and then pick byte 1 from it. The FSMC/FMC allows you to read a 32-bit value from unaligned addresses; so if you want to read a word from the same address, the controller puts 0x10C8 to the address bus, reads the word, picks the 3 upper bytes from it, then it puts 0x10C9 to the address bus, reads the word, and picks the lowermost byte from it, stitches it all together and hands it over to the processor - this is all seamless for the software, except that it takes longer than accessing a word on aligned address.

Writing is similar, except that the processor has to ''tell'' to the memory somehow, which bytes to take into account - and this is the role of the ByteLane (NBLx) signals. So, in case of aligned writes, all NBLx signals go low in the single cycle the write takes; in case of unaligned writes, there are two cycles, with the uppermost NBLx signals going down in first, the lowermost in the second (with the higher word address).

JW
john239955_st
Associate III
Posted on June 01, 2015 at 12:35

Thanks Jan,

I will need to do a turn on my PCB as I did not add the RBLx signals.

Re:- Your example if I read the address of 0x10C8 (aligned), FMC in 32 bit mode, this will be the bytewise address of 0x4320. If I require the byte at 0x4321 would I need to pick byte2 not byte1.

Thanks for all your help.

John W

john239955_st
Associate III
Posted on June 01, 2015 at 16:57

Sorry Jan,

Should this be the second byte assuming your order is byte3, byte2, byte1, byte0.

Also ... I have set the timings to about 1uSec per Read/Write on the aligned address but as you state the non-aligned is slower, about 2.6uS.

If the FMC address A1 is connected to A0 of the 32 bit SRAM, always aligned, does that mean I can load the SRAM much quicker, I have plenty of time to load/format data at the Source CPU address but little time to write to the SRAM.

Once again thanks

John W

john239955_st
Associate III
Posted on June 01, 2015 at 16:58

Sorry Jan,

Should this be the second byte assuming your order is byte3, byte2, byte1, byte0.

Also ... I have set the timings to about 1uSec per Read/Write on the aligned address but as you state the non-aligned is slower, about 2.6uS.

If the FMC address A1 is connected to A0 of the 32 bit SRAM, always aligned, does that mean I can load the SRAM much quicker, I have plenty of time to load/format data at the Source CPU address but little time to write to the SRAM.

Once again thanks.

John W

Posted on June 01, 2015 at 22:46

Much depends on how you ''see'' a multibyte value... But instead of going into details of endiannes, I'd recommend you to experiment further on whatever hardware you have, and together with reading of the material available to RAMs, to achieve full understanding of what's going on.

Even if you don't have the byte lane signals connected, aligned word accesses and all (even unaligned) reads should be correct.

JW