cancel
Showing results for 
Search instead for 
Did you mean: 

parallel interface on stm32f407

sanjib
Associate III
Posted on November 12, 2014 at 11:55

Hello

I'm wondering how to create a parallel interface on the STM32F4Discovery Board, if possible. As far as the application, I would like to connect the Discovery to BLACK FIN DSP (BF592)

I was suggested to do by FSMC .. but I don't know how to do that. does any body can help me with basic code of understanding as well as with the link from which  I can download the FSMC folder from the standard peripheral library.
27 REPLIES 27
Posted on November 12, 2014 at 22:03

The FSMC is an external memory bus, it could be used in a fashion similar to the PC/AT ISA bus, or peripheral chips (UART, FPGA, etc). These would attach like very small SRAM or NOR devices, with a significantly reduced address bus requirement. The number of registers would dictate the address bus width, a USART with 8 registers would need 3 address bits.

The address window decoded by the STM32 could be further decoded to permit multiple devices in the address space.

Look at EVAL board designs using the FSMC for both schematic and code examples.

Does your device attach as a bus memory device (D0..D7, A0..A3, -RD, -RW, -CS, etc)?

You'd need to review the data sheets and manuals for your two devices, and determine if there are compatible modes you could use.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
sanjib
Associate III
Posted on November 17, 2014 at 09:58

Thanks clive for the reply. But my doubt is DSP BF592 have a ppi support . f407 doesn't have. I t has been suggested to me that we can use FSMC........The code I got in the net is accessing the SRAM mounts in the PCB with f407.Here I have to write in the PPI port of BF592...IS that possible.Please make me understand how

Posted on November 17, 2014 at 16:57

The way to assuage your doubts would be to thoroughly understand the interfacing capabilities of your DSP device, and review basic microprocessor interfacing techniques.

I'd have to read up on your DSP chip, I have no driver to do that.

http://www.amazon.com/Introduction-Microprocessors-Software-Hardware-Programming/dp/013487868X

http://www.amazon.com/s/ref=nb_sb_noss_1?url=search-alias%3Dstripbooks&field-keywords=microprocessor%20interfacing

Read your device documentation, and some texts on the basic tenets of microprocessors and interfacing. This will make you a much stronger engineer.....

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
sanjib
Associate III
Posted on December 05, 2014 at 06:47

Hi Clive

AS I have done with the hardware configuration , suggested by a experienced guy . but I have some doubt in the software.

I have a simple application of stm32f407 communication with SRAM mounted in a same PCB. I have a doubtof how it will communicate with BF5..as SRAM have a definite address(register bank address) .Do PPI port of BF592 have that? second is theldr file which I have to write it into the PPI port will be transferfrom stm32f407 to BF-592 PPI port.therefore at the initial stage I haveto store the ldr file in stm32f4where to store ?I know that stm32f407uses the FSMC mechanism to do so but how? Can any body give me a briefidea? How it actually works? I have attach the simple sram and f407 communication . I think we can modify this code just to write abd read the PPI Port as DSP-BF592 kernel will be waiting for the ldr file for booting. We dont have to worry about the dsp programmin that will be done by a DSP guy. The only thing I have to do is handshaking and write the ldr file into the ppi port of DSP and read ....I am confused in the stm32f407 section please help......PD0 to PD10 ,PD14 , PD15,PE8 to PE15 of stm32f407Igt6 is connected to DSP-Bf5 all the pins which are connected to DSP have a FSMC features. So please help clive how to do it...Give me some idea.

0690X0000060MoBQAU.gif

________________

Attachments :

main.c : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HzfL&d=%2Fa%2F0X0000000bRH%2FIqgz322QfjTvwouq8JUPJiCdL_t077oZInLXAZfM0WI&asPdf=false
sanjib
Associate III
Posted on December 05, 2014 at 07:16

just now I got to know that we don't need the PPI port address to read ...we have to enable the GPIO Pins of f407 and push the ldr file bytes  to DSP-bf592. Enabling is ok but How I have to push the data.....May be stm32f407 should read from it's memory and push it in dsp-bf592... Please help

sanjib
Associate III
Posted on December 08, 2014 at 15:05

Please help.....any body worked wit FSMC please help

sanjib
Associate III
Posted on December 08, 2014 at 15:37

Please help.....any body worked wit FSMC please help

Posted on December 08, 2014 at 20:04

I don't have any familiarity with the BF592, explain how the PPI works and what the signals are expected look like.

The FSMC address space just maps into the 32-bit (4GB) address space of the Cortex-Mx processor, you read and write to it like ANY other memory. You can memcpy() to it, you can write to a pointer. Writing in the range of the FSMC memory space generates CS (Chip Select), RD/WR signals, all with the timing/sequencing you configure them with.

The addressing on the BF592, may or may not matter, if you just have an 8 or 16-bit data bus you can just write to any address in the range, and the data/signalling will occur on the bus. Look at how a LCD (16x2) or smart panel with an SSD controller, are attached, and commanded in the STM32.

If the FSMC is too complicated, use pins configured as GPIO, and write data patterns, and handshake signalling, as documented for the BF592.

Where can you store the loader image? How about as an array of bytes/words as if you would embedded a bit-mapped image into source code?

static const uint8_t PacmanImage[] = { 0x00, 0x3C, .... };

memcpy((void *)0x64000000, PacmanImage, sizeof(PacmanImage)); // Copy data to FSMC situated latch
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
sanjib
Associate III
Posted on December 09, 2014 at 06:25

Thanks Clive for your reply....I was having a doubt about FSMC only . I mean in the stm32f407 part. I don't have to worry about BF592 as it's programmed and in BF592 code it is waiting for the handshaking to make and the kernel bootloader is waiting for the ldr file to boot the black fin. that's what bf592 works. we have ldr , which is a binary file . how to convert the ldr file into bitstream and put into array .

The next doubt is the command memcpy((void *)0x64000000, PacmanImage, sizeof(PacmanImage)); I think .0x64000000 is a memory address of cortex m4 processor.So if we copy the image into this memory how can it be a push to the PPI port of BF-592 .I mean copying the image in the memory directly pushes the image into the PPI port or it follows some patterns.I am not understanding it. Please help......Thankful to you atleast now I have certain idea of how to do this.