Hi All I'm trying to interface a 8-bit camera to the C6711 by using the EMIF. I'm wondering if anyone can help me to get EMIF, SDRAM and interrupts to work together. As soon as an interrupt occurs I set a flag, and then return to main. In main there is a while loop that waits for this flag to change. When it changes the value from EMIF must be read and written to SDRAM. This, I can't get to work. I've tried using #pragma DATA_SECTION(image_1,"SDRAM$heap"); and then in my main after the while image_1[pixel_counter]= CE3[32]&0xFF; . When I then want to read the values then from image_1, they are still the values that I initialized them to. Can anyone give me any advice?? I think my problem is with the read from EMIF, CE3[32]&0xFF. Do my code look OK?? Thanks Werner |
|
EMIF read and SDRAM
Started by ●September 24, 2003
Reply by ●September 24, 20032003-09-24
Werner wrote : > #pragma DATA_SECTION(image_1,"SDRAM$heap"); and then in my main > after the while Arg! Very bad usage of this. 1/ If you want to allocate your image_1 array from heap in SDRAM you should : - provide enough room in the SDRAM heap (CDB -> System -> MEM -> SDRAM -> heap size - use MEM_alloc() DSP/Bios API to dynamilcally allocate memory Uint16 *pImage = MEM_alloc( seg_sdram, 352*288x2, 0 ); 2/ If you prefer (like me) static allocation and force location in SDRAM : #pragma DATA_SECTION( "Image", "toSDRAM" ); Uint16 Image[288][352]; and add to you linker control file : SECTION { toSDRAM > SDRAM } (providing SDRAM is the name used to define the SDRAM implementation. > As soon as an interrupt occurs I set a flag, and then return to > main. In main > there is a while loop that waits for this flag to change. Have a look to HWI and SEM_post() if you are using DSP/Bios. > image_1[pixel_counter]= CE3[32]&0xFF; . When I then want to read > the values I suppose that CE3 is something like : volatile Uint32* CE3 = (volatile Uint32*)0x<somehexaaddress>; What is your target board ? Yours or a DSK ? What is your camera ? How is it connected to EMIF ? Have you looked at EMIF registers setting for defining EMIF mode (asynchronous vs synchronous, wait states,....) ? Jean-Michel MERCIER -- dsp & imaging - www.ateme.com ATEME - 26 Burospace - 91573 BIEVRES Tel : +33 (0)1 69 35 89 73 (direct) Fax : +33 (0)1 60 19 13 95 |