cancel
Showing results for 
Search instead for 
Did you mean: 

FMC bus in SRAM Mode does not issue read transactions on the bus when read from same address.

BElis
Associate II

trying to read from external SDRAM like device, 16 bit data, 10bit address, Mode A (not extended timing) a page of data in a loop of one second.

The first read page succeeds and all data is received correctly.

After that i can see that further reads (from the same address) are not generated on the bus.

Put Oscilloscope channels on NOE and NE1 lines and no activity at all (after the first page).

only if i change the address the transaction occurs physically.

Base Address is set to 0x60000000 (Bank1/NE1)

Using CubeMX. the code in main:

//==================================

// TICK 1Hz

//==================================

if(l_uiTick1Hz < HAL_GetTick())

{

l_uiTick1Hz = HAL_GetTick() + 1000;

HAL_SRAM_Read_16b(&hsram1, (uint32_t*)(address1), (uint16_t*)buffer1, 256);

/* this loop works only if i add the next line */

address1 += 256*2;

}

can anyone say what is wrong?

please keep in mind that the first page read is successful so there is no timing issue and no initialization issues (or are there?)

Ben.

1 ACCEPTED SOLUTION

Accepted Solutions
BElis
Associate II

Cache!!!!!!!!!!! it was the cache!

Problem solved.

thank you!

View solution in original post

4 REPLIES 4

Cache switched off?

Area set to Device in MPU?

JW

BElis
Associate II

Cache!!!!!!!!!!! it was the cache!

Problem solved.

thank you!

Your tick method is also seriously broken. Apt to fail 49 days out. You can't do the comparison in this fashion.​

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
BElis
Associate II

Dear Clive, BUT of course, this is only for debug and testing. we are in the bring-up phase of the machine. this is not how we write our application.

thank you anyway for your concern. it is much appreciated.