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.

RTOS/TM4C1294NCPDT: TM4C1294KCPDT

Part Number: TM4C1294NCPDT


Tool/software: TI-RTOS

Hi,

Is DMA transfer is possible in internal eeprom?

Regards

Nikhil

  • It is possible to use the uDMA to read data from a block of EEPROM. It is not practical to use uDMA to write to the EEPROM as subsequent writes must be delayed (by polling or by interrupt) until the "WORKING" bit has cleared.
  • Hi Bob,
    Could you clarify few points?

    1. Will it generate an interrupt for each 4 byte transfer?
    2. In call back method is it possible to configure it to generate a single interrupt after completing transfer of a complete packet of size 96 bytes?
    3. Is there any sample code available for DMA based eeprom ?

    Regards
    Nikhil
  • Nikhil KV1 said:
    1. Will it generate an interrupt for each 4 byte transfer?

    By "it" do you mean using the DMA to read? You set the transfer size and get an interrupt when the transfer is complete. You should do the DMA transfer using 32-bit reads from the EERDWRINC register and you cannot cross the block boundary. That way you can read 16 32-bit words, or 64 bytes and then generate an interrupt. But reads happen so fast that I don't think anyone has bothered to use DMA. Typically they just call EEPROMRead().

    Nikhil KV1 said:
    2. In call back method is it possible to configure it to generate a single interrupt after completing transfer of a complete packet of size 96 bytes?

    When writing to the EEPROM using interrupts you get an interrupt after each 32-bit word is written. Typically you would write a function that you pass an address, a count, a pointer to a data buffer and a pointer to a call back function. This routine would keep a static copy of the address and count (and of the data buffer if the data pointer did not point to a static buffer). It would start the process by enabling flash interrupts and calling EEPROMProgramNonBlocking(). The flash interrupt routine would have access to the static address and count and would make subsequent calls to  EEPROMProgramNonBlocking() until all data was programmed, then call the callback function.

    Nikhil KV1 said:
    3. Is there any sample code available for DMA based eeprom ?

    No, and while using DMA for read is possible, it is not practical. Reading is not the time issue, it is writing.

  • Hi Bob,

    While using DMA in writing is there any benefits.?

    Actually i have some critical tasks, and i want to write almost 200 bytes of data to the eeprom at a time.
    But using interrupt method my tasks will preempt by interrupt after every 4 byte write.
    Also i lost additional context switching time.
    Which is the best method to resolve this issue?..

    Regards
    Nikhil
  • Writing with DMA is not supported because you don't get a DMA request when each 4 bytes finish being programmed. The best option is to use interrupts. The context switch is efficient and the flash interrupt routine should be very short.