Quantcast
Channel: Processors
Viewing all articles
Browse latest Browse all 123829

Forum Post: RE: Code to interface SDRAM (MT48LC2M32B2TG-6) with DSP C6713B on Code Composer Studio Version: 5.5.0.00077

$
0
0

Thanks for your response RandyP.

The only reason I am using C6713B is that there is a lot of support(help) for dsp available here. 

Secondly, this is the code I copied from spra433e. It should basically configure the EMIF for connection with SDRAM.

#include <csl_emif.h>
//#include <csl_emifhal.h>
#include <csl.h>
void set_EMIF();
void main()
{
/* initialize the CSL library */
CSL_init();
set_EMIF();

}
void set_EMIF()
{
//Set value of global control register
//Register make
//Set value of global control register

Uint32 global = EMIF_GBLCTL_RMK(
EMIF_GBLCTL_NOHOLD_OF(0),
EMIF_GBLCTL_SDCEN_ENABLE,
EMIF_GBLCTL_SSCEN_ENABLE,
EMIF_GBLCTL_CLK1EN_ENABLE,
EMIF_GBLCTL_CLK2EN_DISABLE,
EMIF_GBLCTL_SSCRT_OF(0),
EMIF_GBLCTL_RBTR8_HPRI );

//Set value of CE2 control register
// Field of interest is: MTYPE field
// (other field are set to the default values)
Uint32 control3 = EMIF_CECTL_RMK(
EMIF_CECTL_WRSETUP_DEFAULT,
EMIF_CECTL_WRSTRB_DEFAULT,
EMIF_CECTL_WRHLD_DEFAULT,
EMIF_CECTL_RDSETUP_DEFAULT,
EMIF_CECTL_RDSTRB_DEFAULT,
EMIF_CECTL_MTYPE_SDRAM32,
EMIF_CECTL_RDHLD_DEFAULT );
//Set value of SDRAM control register
// Fields of interest are: TRC,TRP,TRCD,INIT,RFEN, and SDWID
Uint32 sdcontrol = EMIF_SDCTL_RMK(\
EMIF_SDCTL_SDWID_DEFAULT
EMIF_SDCTL_RFEN_ENABLE,
EMIF_SDCTL_INIT_YES,
EMIF_SDCTL_TRCD_OF(1),
EMIF_SDCTL_TRP_OF(1),
EMIF_SDCTL_TRC_OF(6) );

//Set value of SDRAM timing register with refresh period
// Field of interest is: Period Field
Uint32 sdtim = EMIF_SDTIM_RMK(
EMIF_SDTIM_PERIOD_OF(1562) );

EMIF_configArgs(
EMIF_GBLCTL_OF(global), // global control
EMIF_CECTL_OF(0x00000018), // 32-bit async mem
EMIF_CECTL_OF(0x00000018), // CE1 control
EMIF_CECTL_OF(0x00000018), // CE2 control
EMIF_CECTL_OF(control3), // CE3 control
EMIF_SDCTL_OF(sdcontrol), // SDRAM control
EMIF_SDTIM_OF(sdtim), // SDRAM timing
EMIF_SDEXT_OF(0x00000000) // SDRAM extension
);

}

///////////////////////////////////////////////////////

This is the code for C6713, I have added CSL library and linker cmd file.

On compiling it gives me errors

Description Resource Path Location Type
#55-D too few arguments in macro invocation main.c /SDRAM line 974 C/C++ Problem
#20 identifier "EMIF_SDCTL_SDWID_DEFAULT" is undefined main.c /SDRAM line 968 C/C++ Problem
#18 expected a ")" main.c /SDRAM line 968 C/C++ Problem
#20 identifier "EMIF_GBLCTL_RBTR8_HPRI" is undefined main.c /SDRAM line 953 C/C++ Problem
#55-D too few arguments in macro invocation main.c /SDRAM line 965 C/C++ Problem
#29 expected an expression main.c /SDRAM line 958 C/C++ Problem
#20 identifier "EMIF_GBLCTL_SSCEN_ENABLE" is undefined main.c /SDRAM line 949 C/C++ Problem
#138 expression must be a modifiable lvalue main.c /SDRAM line 950 C/C++ Problem
#138 expression must be a modifiable lvalue main.c /SDRAM line 951 C/C++ Problem
#20 identifier "EMIF_GBLCTL_SSCRT_OF" is undefined main.c /SDRAM line 952 C/C++ Problem
#20 identifier "EMIF_GBLCTL_RMK" is undefined main.c /SDRAM line 945 C/C++ Problem
#20 identifier "EMIF_GBLCTL" is undefined main.c /SDRAM line 947 C/C++ Problem
#20 identifier "EMIF_GBLCTL_SDCEN_ENABLE" is undefined main.c /SDRAM line 948 C/C++ Problem
#29 expected an expression main.c /SDRAM line 978 C/C++ Problem
#55-D too few arguments in macro invocation main.c /SDRAM line 979 C/C++ Problem
#29 expected an expression main.c /SDRAM line 968 C/C++ Problem

Can you plz suggest how can I resolve these errors.


Viewing all articles
Browse latest Browse all 123829

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>