cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F767 FMC data over write?

bradleybare
Associate II
Posted on June 23, 2016 at 00:33

Hello,

I am working with the Nucleo-144 but I seem to be having a data overwrite issue with the FMC. 

At first I was having a problem getting the LCD to show anything. I found I needed to insert a delay between each command, otherwise only a few commands were being sent. It all worked and now I am trying to solve this problem. It requires a 1 Microsec delay which is not acceptable.

I looked through the reference manual but I did not find anything with regard to data being overwritten. I also do not remember this issue when I used the FSMC on the STM32F4 discovery.

I was thinking about using the DMA to transfer every 1 Microsec but I really do not want the interrupt overhead. 

Why does this happen with the STM32F7 FMC but not the F4 FSMC? What are my options to resolve this?

Any opinions are appreciated!

Thank you

4 REPLIES 4
bradleybare
Associate II
Posted on June 23, 2016 at 01:43

Well I tried to access different parts of the ''memory''

 in the FMC while keeping the address pin for the LCD set

 and it works. So it is some kind of data overwrite because the CPU is faster than the FSMC.

Again I cannot understand why I didn't experience this with the F4.

I think I'm going to use the DMA to transfer and increment the memory address to help resolve the issue. 

If anyone knows a better way please let me know.

Thanks!

bradleybare
Associate II
Posted on June 23, 2016 at 01:52

This is a weird issue. If I change the timing settings then my fix breaks again.

Must be in my config I'm going to check it out.

bradleybare
Associate II
Posted on June 23, 2016 at 15:38

I cannot figure this out. Is this supposed to happen with the FMC?

I've read through the FMC section twice now and I haven't found a cause for the issue.

Someone with more knowledge please help.

AVI-crak
Senior
Posted on December 23, 2016 at 21:27

MPU->RNR = 0;

MPU->RBAR = 0x20000000;

MPU->RASR = 0x03060025; /// C=1, B=0, TEX=0, S=1, SRD=0, XN=0, AP=3, size=0x12 (512k)

MPU->RNR = 1;

MPU->RBAR = 0x08000001;

MPU->RASR = 0x03020027; /// C=1, B=0, TEX=0, S=0, SRD=0, XN=0, AP=3, size=0x13 (1M)

MPU->RNR = 2;

MPU->RBAR = 0x600fff02;

MPU->RASR = 0x03040029; /// C=0, B=0, TEX=0, S=1, SRD=0, XN=0, AP=3, size=0x13 (1M)

MPU->RNR = 3;

MPU->RBAR = 0x90000003;

MPU->RASR = 0x0306002d; /// C=1, B=0, TEX=0, S=1, SRD=0, XN=0, AP=3, size=0x16 (8M)

MPU->RNR = 4;

MPU->RBAR = 0xc0000004;

MPU->RASR = 0x03070033; /// C=1, B=1, TEX=0, S=1, SRD=0, XN=0, AP=3, size=0x19 (64M)

MPU->RNR = 5;

MPU->RBAR = 0x40000005;

MPU->RASR = 0x13040039; /// C=0, B=0, TEX=0, S=1, SRD=0, XN=1, AP=3, size=0x16 (0.5G)

MPU->RNR = 6;

MPU->RBAR = 0xe0000006;

MPU->RASR = 0x1300002d; /// C=0, B=0, TEX=0, S=0, SRD=0, XN=1, AP=3, size=0x16 (0.5G)

MPU->RNR = 7;

MPU->RBAR = 0;

MPU->RASR = 0;

MPU->CTRL = 7;