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.

XINTF zone address pointers

Other Parts Discussed in Thread: TMS320F28335

I have been trying to understand how addressing works in XINTF in TMS320F28335. I read through all available documents on XINTF but still confused. Would someone be able to help me with it please?

In my application, I want to use XINTF to read external ADC data in combination with XREADY. XREADY will be used to control the start/stop data buffering in XINTF ZONE. All good so far! However, I can not find a way to reset the addressing for XINTF Zone. How can I reset address such that it starts from the first address or any given address? Is it possible to do that or address pointers simply spins around have no control over it? 

I saw an example of XINTF to DMA transfer in burst. It also has no mention of current address pointer. How do I know if data overflow has occurred?

Can someone please shed some light on this?

  • To use the XINTF, you setup your zone and then read or write from the external device using a regular memory mapped read or write to the address of interest.  I don't think there is an address pointer at all inside the XINTF itself. It translates CPU read or write instructions in the memory mapped region into an external read or write sequence. 

    The XREADY signal is usually used when the external memory is asynchronous and you don't know exactly how long a specific read or write will take. I don't think you will be able to use it to specify how many words to transfer into your buffer. It only determines how long a single write or read operation takes.

    Once you have the XINTF setup correctly, I think you will only have to worry about the DMA configuration to determine how much data to move to your buffer and when. 

     

  • Thank you Devin for the reply. It is still not clear to me yet. 

    In my application, I am trying to load ADC data using parallel interface to XINTF. My understanding is Address lines (XA 19:0) will increment after each XRD strobe. Those address will basically point to XINTF memory zone where data will be stored. I have two questions

    1. What happens when address increments reach its maximum value? Will it simply wrap to first address?

    2. Is it possible to reset address pointer to the beginning at any given time? Is there hardware signal that can be used to reset the pointer? 

    I really appreciate your response. 

  • There is not an address pointer in the XINTF.  After each read, nothing will be incremented in the XINTF.  

    The XINTF will translate memory mapped reads into external reads.  Note that in the F28335 memory map, addresses 0x100000 to 0x200000 are labeeled as XINTF Zone 6. When a read is issued to this memory region from any source (CPU or DMA) then the lower 20 bits of that read address will be put on the XA 19:0 pins and the pins will be strobed with the timings setup in the XINTF for zone 6 to perform a read.  

    For example, a cpu read of address 0x1F0F0F, which might look like this in C

    Uint16 var = *((Uint16*)0x1F0F0F);

    This will cause the XINTF to put 0xF0F0F on XA 19:0 and perform the XINTF read operation as specified by zone 6. The external read result will be stored in the variable "var".  The next read could be some other random address, such as 0x155555.  There is not requirement from the XINTF to read addresses in any particular order.

    Similar to how you can issue a memory mapped read in C, the DMA can treat the XINTF zone like any other memory.

    You should configure and test the XINTF for your external ADC using the CPU and C or assembly code, then consult the DMA guide on how to automatically read blocks of data from the external device into internal RAM.

  • I understand now. Thanks for the clear explanation. One final questions.

    If I setup DMA to transfer XINTF ZONE data to RAM, can I use XREADY or XHOLD to define when to start/stop reading data into memory? In my application, I need to be able to read burst of ADC data defined by external logic signal. e.g If I want 100 samples from ADC, external logic signal will go high for the time required for 100 samples.

  • I think it should be possible to do what you intend.  However, I don't think you want to use XREADY or XHOLD.

    XREADY is used for a particular memory access to extend that single read or write to meet the timings of your external device.

    XHOLD will high Z the XINTF pins so that another device (perhaps another CPU) can perform a read or write to your external memory device.

    I think what you want to use is XINT (external interrupt), not to be confused with XINTF (external interface).  Connect the signal that indicates the number of reads to a GPIO.  Setup an external interrupt to be triggered by that GPIO on both the rising and falling edge.  When the interrupt is triggered the first time (rising edge), start the DMA in the ISR to continuously transfer data from your external ADC to the internal buffer.  When the interrupt is triggered the second time (falling edge), stop the DMA in the ISR.  

    It may also be possible to directly start/stop the DMA with the XINT without taking an ISR, but I am not sure.  Consult the F2833x DMA guide.    

  • Thank you. I would like to use DMA to free UP CPU. I will consult the DMA guide. You have explained it well for me. Appreciated.