cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 FMC Observable Read Failure?

RMcmu.1
Associate II

Hi, I have an FPGA connected to the STM32 (STM32F746IGT). The FPGA is set up to work as SRAM (tested and confirmed working). I’m using the STM’s Flexible Memory Controller to read from the ‘sram’. Now this works, but after 2 read cycles, the FMC stops attempting to read the ‘sram’. I have connected a logic analyzer to confirm, I was able to observe that the FMC dose not toggle any address lines or the enable pins after a few read cycles.

The FPAG is configured to have 12 address lines, 8 data lines, NEO & NE1. The ‘sram’ has no write functionality. The ‘sram’ is filled will data internally, and a ready signal gets toggled when the ‘sram’ is full, this signals the STM to read xyz data.

It almost looks as if the FMC reads the data form an address range, then assumes there is no data change, so it does not attempt to read anymore. Has anyone had experience with this? If this is in fact what the FMC is doing, is there a way to ‘reset’ the FMC?

If any one can provide any information, it would be really appreciated. I’m looking forward to a reply. I can provide more details, if needed.

5 REPLIES 5
RMcmu.1
Associate II

I checked the errata for that chip and found this.

0693W00000NrDw1QAF.png This sounds like the issue I'm having..... I suppose I'll not divide by 2?

Is there a way to manually start the FMC_CLK? or is it dependent on a transaction.

> after 2 read cycles, the FMC stops attempting to read the ‘sram’

How exactly do you perform those "more than 2 read cycles"? Post code and related LA waveforms.

The erratum talks about "continuous clock". Do you have such feature enabled?

Read out and check/post FMC registers content.

JW

I can post code and waveforms Monday (I'm not at the office today).

"continuous clock" is not a feature in the FMC tab of the CubeMX configuration wizard, so I'll need to double check the init functions (it may have been set when I changed access modes).

As far as reading the FMC regs, that's a good idea, what should I be looking for? Again I can provide those Monday.

Thanks for responding.

Edit: I'm also sharing the FMC bus with SDRAM.

Happy Monday!

During testing this morning, I have found that disabling d-cache stops the observable read failure. (full code and wave captures are attached)

Test 1, is the standard init governed by cubeMX.

0693W00000NrGQIQA3.png 

Test 2, is the same code with D-cache disabled.

0693W00000NrGQXQA3.png

You can/should selectively disable caching for​ the SRAM area in MPU. In fact you should set it as Device.

JW​