cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 Interface with FSMC and DMA

ginnikhanna27
Associate II
Posted on March 21, 2012 at 12:56

Hi,

I have to read a 15 bit parallel data coming from a camera sensor and one bit as a request signal which tells whether the micrcontroller should initiate memory transfer or not.

Does FSMC has any trigger signal within itself so that I dont want to use any external interrupt or timer to trigger the transfer ?

Please help me out.
34 REPLIES 34
amin23
Associate II
Posted on March 22, 2012 at 07:52

Hello,

Try to use DCMI camera interface

instead of

FSMC.

ginnikhanna27
Associate II
Posted on March 22, 2012 at 10:09

DCMI interface provides only 14 bit parallel interface. I need to read at one single time 15 bits of parallel data and 1 bit for the request from the sensor.

kantarofilip
Associate II
ginnikhanna27
Associate II
Posted on March 22, 2012 at 12:22

I went through the manual, but I cant seem to judge whether there can be an external trigger to the FSMC to function, or it should be done with the TIMER external trigger and the DMA exectuting the memory transfer.

There is one example, which says to poll the Ready/Busy signal.But again, I think it might overhead my application. Do you have any other suggestions for reading a 16 bit parallel data on STM32F?

Posted on March 22, 2012 at 13:18

Maybe you can use one of the TIMx_CHx INPUTS as a DMA trigger, and thus a FSMC access.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
ginnikhanna27
Associate II
Posted on March 22, 2012 at 14:36

Yeah thats what I thought, I was just checking out if there is any direct trigger to the FSMC to initiate the data transfer.

Posted on March 22, 2012 at 15:09

Yeah thats what I thought, I was just checking out if there is any direct trigger to the FSMC to initiate the data transfer.

Well, unless I missed how FSMC works, it's just an external bus interface, the transfer is a memory access. That memory access could be performed by the processor (read/write), or externally via DMA.

Unfortunately generating external DMA requests is not something ST has apparently put much thought or documentation into.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
alok472
Associate II
Posted on March 24, 2012 at 05:05

Which is the camera sensor you are using with has 15b bus ? As far as i know, the camera provide their own Clock, which needs to be used by host to take data. Hence the DCMI.

Does this camera have internal buffer/ RAM to store the image ? In this case FSMC can be useful..otherwise i am curious to understand how it works. 

Using a GPIO or Interrupt can also be done for triggerring DMA. 

Did you consider not connecting a LSb of sensor to DCMI and loose some info ? 

ginnikhanna27
Associate II
Posted on March 27, 2012 at 10:39

Hi Alokm,

The problem is :

The sensor is sending a 15 bit data and 1 request signal to the microcontroller. 7 bits are used for X coordinate and 7 bits for Y coordinate and 1 bit for brightness. I can't lose the 1 bit as it would beat the purpose of the application. I thought of the solution to trigger the DMA transaction with TIM trigger option. But i dont know if I can initiate the DMA transaction from the GPIO base address to an address in memory or does the TIMER only initiates a tranfer among its register. Do you have any clue ?