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.

TMS320f28335 Data bus

Other Parts Discussed in Thread: TMS320F28335

I m using the eZdsp kit for tms320f28335. I have configured the gpio pins 64 to 79 as lower order data bus using the mux settings.

I am writting 0/1 on the data bit (XD15) i.e gpio 64. However when i monitor the pin i dont get the desired result. Are there any more settings to write on the data bus.

I have tried using data register , set register as well as toggle register for group C

What are the required steps if i want to write 0/1 on each bit of data bus. What all registers are required to write the data.

 

 

  • Pankaj said:

    I m using the eZdsp kit for tms320f28335. I have configured the gpio pins 64 to 79 as lower order data bus using the mux settings.

    Just to clarify, are you configuring the GPIO[79:64] as the XINTF data lines XD[15:0]?

     

    Pankaj said:

    I am writting 0/1 on the data bit (XD15) i.e gpio 64. However when i monitor the pin i dont get the desired result. Are there any more settings to write on the data bus.

    I have tried using data register , set register as well as toggle register for group C

    Assuming you have configured in the GPIO[79:64] as the XINTF XD[15:0], you would not use the GPIO Group C GPCSET, GPCCLEAR or GPCTOGGLE registers.  These are only appropritate if the GPIO[79:64] pins are used as GPIO.

     

    Pankaj said:

    What are the required steps if i want to write 0/1 on each bit of data bus. What all registers are required to write the data.

    If you are using GPIO[79:64] as the XINTF XD[15:0], then you would need to configure the XINTF module using the TMS320x2833x, 2823x External Interface (XINTF) Reference Guide (SPRU949) to setup a Zone.
    It is not clear to me if you really want just GPIO.  If so, the GPIO Port C MUX1 GPCMUX1 register should be setup to choose GPIO mode for the associated pins.  Then the GPCSET, GPCCLEAR and GPCTOGGLE would work.
    You would need to also setup the GPIO[79:64] as outputs for GPCSET, GPCCLEAR and GPCTOGGLE to operate.  This is done via the GPIO Port C Direction register GPCDIR.  By default, the GPIOs are defined as inputs.

    EDIT : I would suggest looking at the TMS320x2833x, 2823x System Control and Interrupts Reference Guide (SPRUFB0) for information on the GPIO module.

  • i have configured the pins as XD0-XD15 using the mux register.

    There is no problem when i use them as gpio pins.

    I have used all the necessry registers for configurring them as GPI/O and with gpio i am able to write and read as well.

    But the problem is to use them as data lines.Is it that i cannot use individual pins when i configure them as XD0-XD15. however if i want to put some arithmetic calculation o/p on the data bus which will be received by some other device (e.g fpga.) then how do i put it on the data bus.

    BrandonAzbell said:

    "If you are using GPIO[79:64] as the XINTF XD[15:0], then you would need to configure the XINTF module using the TMS320x2833x, 2823x External Interface (XINTF) Reference Guide (SPRU949) to setup a Zone."

    I guess this will be necessary when i have  SRAM or Flash on the appropriate zone. e.g on the eZdsp kit there is an SRAM on zone 7. But if there's no memory but some other ic lets assume another micro controller connected on data bus of dsp.

    Also the example code given copies directly from dsp MEMORY to external RAM which is done by intruction  MemCopy();.

     

  • Pankaj said:

    i have configured the pins as XD0-XD15 using the mux register.

    There is no problem when i use them as gpio pins.

    I have used all the necessry registers for configurring them as GPI/O and with gpio i am able to write and read as well.

    But the problem is to use them as data lines.Is it that i cannot use individual pins when i configure them as XD0-XD15. however if i want to put some arithmetic calculation o/p on the data bus which will be received by some other device (e.g fpga.) then how do i put it on the data bus.

    You will need to use the entire XINTF bus, or at least more than just the XD15-XD0 signals.  These are simply the data lines, but to communicate to your FPGA you will need some qualifying signals such as the control signals of the XINTF to let the FPGA know when to capture the data on XD15-XD0.
    When the XINTF is used, it allows the C2000 CPU to perform read and write accesses to devices externally to the device.  This would linclude your FPGA and not just SRAM or FLASH.  However, the XINTF will not keep the data on the XD15-XD0 after the access is over, so you need qualifier signals and your FPGA logic needs to use these qualifier signals to know when to sample the XD15-XD0.

    Basically, you will need to implement an interface inside the FPGA that makes the FPGA look like an SRAM to the F28335.

     

    Pankaj said:

    I guess this will be necessary when i have  SRAM or Flash on the appropriate zone. e.g on the eZdsp kit there is an SRAM on zone 7. But if there's no memory but some other ic lets assume another micro controller connected on data bus of dsp.

    Also the example code given copies directly from dsp MEMORY to external RAM which is done by intruction  MemCopy();.

    As mentioned above, my recommendation is to implement an SRAM-like interface inside the FPGA that uses the XD15-XD0, XZCS[*], XRW, XREADY, XCLKOUT and perhaps some of the XA[*] for allowing to write to multiple addresses.

  •  

    "As mentioned above, my recommendation is to implement an SRAM-like interface inside the FPGA that uses the XD15-XD0, XZCS[*], XRW, XREADY, XCLKOUT and perhaps some of the XA[*] for allowing to write to multiple addresses."

     

    xintf_run_from\Example_2833xCodeRunFromXintf.c.

    This is the example we are refering for external interface.. In this example we did not find XZCS[*], XRW signals.

    Is the chip select signal generated automatically or we have to pull it down.

    Do you have any sample code for writing and reading from databus?

  • the program for external interface is working and i montiored the read and write enable signals. I got the required result but the doubt still remains the same.

    how do I o/p some calculation result on one particular address.

     

  • Pankaj,

    You could use a pointer to the memory location.  For example:

       Uint16 * xintfptr = (Uint16 *)0x20000;

       Uint16 value;

    ....

       *xintfptr = value;

     

    Or you could link a variable/structure to the address by using the DATA_SECTION pragma statement  (described in the compiler ref guide).

     

    -Lori

     

     

  • Lori Heustess said:

    Pankaj,

    You could use a pointer to the memory location.  For example:

       Uint16 * xintfptr = (Uint16 *)0x20000;

       Uint16 value;

    ....

       *xintfptr = value;

     

    Or you could link a variable/structure to the address by using the DATA_SECTION pragma statement  (described in the compiler ref guide).

     

    -Lori

     

     

     

     

    do i need to initialize zone for this code?

     

     

  • Yes.  You need to enable the XINTF clock and configure the GPIO for the address, data, chip selects, write/read strobes as is done in the run from XINTF example.

    Cheers

    Lori

  • Thank you.

    it worked for different zones.

    now i am able to read and write to zones.

    But i am also using SCI-A for debugging and the problem is multiplexed pins.

    TXDA / XA-19

    TXDA / XRNW.

    well, thats not an issue. It would be better if there are dedicated pins for add and data lines like that for ADC.

    Thanks a lot!

    Also there's a problem regarding small size of ram. I get an error message " can't allocate .text to raml0."not enough memory problem.

    .text            : >> RAML0|RAML1|RAML2  ,  PAGE = 0   

    i tried this but it didnt work.

    As we develop our code and interfacing more h/w, we may come up with more queries. hope that wont be a problem.

     

     

  • Thank you.

    it worked for different zones.

    now i am able to read and write to zones.

    But i am also using SCI-A for debugging and the problem is multiplexed pins.

    TXDA / XA-19

    TXDA / XRNW.

    well, thats not an issue. It would be better if there are dedicated pins for add and data lines like that for ADC.

    Thanks a lot!

    Also there's a problem regarding small size of ram. I get an error message " can't allocate .text to raml0."not enough memory problem.

    .text            : >> RAML0|RAML1|RAML2  ,  PAGE = 0   

    i tried this but it didnt work.

    As we develop our code and and after interfacing more h/w, we may come up with more queries. hope that wont be a problem.

  • Pankaj said:

    Also there's a problem regarding small size of ram. I get an error message " can't allocate .text to raml0."not enough memory problem.

    .text            : >> RAML0|RAML1|RAML2  ,  PAGE = 0   

    i tried this but it didnt work.

    Even though you are specifying to the linker to use either RAML0, RAML1 or RAML2 for code found in the .text section, this does not make RAML0, RAML1 or RAML2 look like a contiguous memory.
    You should be able to create a map file using a linker command line switch to see which code elements are not getting mapped.

    You also have the option of allocating your code to Flash and use the Flash Programming utilities to get the image into the flash.

  • Uint16 * xintfptr = (Uint16 *)0x20000;

     Uint16 value;

    value=0;

    for(;;)

    {

     

     *xintfptr = value;

    SciaRegs.SCITXBUF=value+'0';

    delay();

    SciaRegs.SCITXBUF=*xintfptr+'0';

    delay();

    SciaRegs.SCITXBUF=0x20;        //space inserted

    value++;

    if(value==9)

    value=0;

    }

    Required output:

    00 11 22 33 44 55 66 77 88 00 11 .......

     

    actual Output:

    04 15 26 37 44 55 66 77 8< 04 15 26 37 44 55 66 77 8

    for 0,1,2,3 and 8 , the ascii value is original ascii value +4.

    for 0 the o/p is 4

    any suggestions?