This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
HI all
My plan is to attach a RAM(IS61WV51216BLL) to the TMS320F28335 XINT zone 7 in the 16 bit databus mode.
My InitXintf() looks like:
// All Zones--------------------------------- EALLOW; XintfRegs.XINTCNF2.bit.XTIMCLK = 1; // =1 ^= XTIMCLK = 1/2 SYSCLKOUT XintfRegs.XINTCNF2.bit.WRBUFF = 1; // =0 ^= No write buffering XintfRegs.XINTCNF2.bit.CLKOFF = 0; // =0 ^= XCLKOUT is enabled XintfRegs.XINTCNF2.bit.CLKMODE = 1; // =1 ^= XCLKOUT = XTIMCLK/2 EDIS; ... EALLOW; XintfRegs.XTIMING7.bit.XWRLEAD = 2; XintfRegs.XTIMING7.bit.XWRACTIVE = 4; XintfRegs.XTIMING7.bit.XWRTRAIL = 1; // Zone read timing XintfRegs.XTIMING7.bit.XRDLEAD = 2; XintfRegs.XTIMING7.bit.XRDACTIVE = 4; XintfRegs.XTIMING7.bit.XRDTRAIL = 1; XintfRegs.XTIMING7.bit.X2TIMING = 0; // ='1' ^= double all Zone read/write lead/active/trail timing XintfRegs.XTIMING7.bit.USEREADY = 1; // ='1' ^= don't ignore XREADY XintfRegs.XTIMING7.bit.READYMODE = 1; // ='1' ^= sample asynchronous XintfRegs.XTIMING7.bit.XSIZE = ; // 1,1 ^= x16 other values are reserved EDIS; InitXintf16Gpio(); //Force a pipeline flush to ensure that the write to the last register configured occurs before returning. asm(" RPT #7 || NOP");
.
In the next picture I try to write something to address 1 , once in 16bit mode and once in 32 bit mode
strange here is
1st : XWE0n is in 16bit mode 2 times enabled (I would expect 1 time) ; opposite in 32bit mode
2nd : The address is in both cases, the way one would expect in 32-bit mode [ XA(19:1) -->A(18:0) ]
3rd : No clue what XA0 is doing...
I write the memory like :
*( StartAdress + SHIFT_ADDR(iAdr) ) = Value; // StartAdress:(Uint32 *)0x200000 ; iAdr =1 ; #define SHIFT_ADDR(temp) (temp)
What did I forgot to initialize??
Every help is highly appreciated, then soon I'm desperate...
My goal is to attach a 16bit RAM to the XINTF Zone 7. [XA0..XA15(outputs 28335) to A0...A15(ext. memory) ] (attached like shown in SPRU949D Fig.4)
and then to access it like:
*(RAM_BASE + AddressToWrite) ) = VarToWrite;
// #define RAM_BASE (Uint32 *)0x200000 ; Uint16 AddressToWrite = 0x0001 ; Uint16 VarToWrite = 0xAAAA
When I'm doing so it writes at Address 0 : 0xAAAA && at Address 1 : 0x0000 (it writes a 32bit value correct into the memory)
I dream would be ...... at Address 1 : 0xAAAA
why what decides that i wanna write a 32bit value what I won't ????????!!!!!!!!!!!!!
Conclusion:
If I would just need the RAM i could tinker arround with and I finally use it. BUT if I wanna program a Flash I need to be able to write specific addresses! There I could connect it like XA1..XA16(outputs 28335) to A0...A15 (ext. memory) switch to 32bit mode and tinker around until it works.
I like to tinker around at home or for tricky things at work, BUT not for such basic things.
It's my first TI uC that I'm programming, so I'm probably doing something wrong in principle. Unfortunately I don't have a clue what!
Is there an example how to access memory like the wiring shown in SPRU949D Fig.4
Every hint, help or sympathy would help my poor soul!
Christian,
When you define RAM_BASE to be a (Uint32*), you are telling the compiler that you want to do 32-bit read/writes.
What you want is a (Uint16*). Alternatively, you could define the entire memory space as a large array, and then use a DATA_SECTION and the command file to place it in the correct location. So for example:
#DATA_SECTION(flashMemory, "Flash")
Uint16 flashMemory[FLASH_MEMORY_WORDS];
and in the command file:
MEMORY {
PAGE 0:
FLASH_MEM : origin = 0x200000, length = put-your-length-here
}
SECTIONS
{
Flash > FLASH_MEM
}
Regards,
Bill