2019-10-01 03:03 PM
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.
Solved! Go to Solution.
2019-10-01 04:25 PM
2019-10-01 03:49 PM
Cache switched off?
Area set to Device in MPU?
JW
2019-10-01 04:25 PM
Cache!!!!!!!!!!! it was the cache!
Problem solved.
thank you!
2019-10-01 05:15 PM
Your tick method is also seriously broken. Apt to fail 49 days out. You can't do the comparison in this fashion.
2019-10-02 11:55 AM
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.