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.

TMS570LC4357: SCI Receive using DMA

Part Number: TMS570LC4357
Other Parts Discussed in Thread: HALCOGEN

Does a working example exist to demonstrate using the DMA to receive over SCI? I have attached the HL_sys_main.c file I have generated to configure sci3 to receive 85 bytes via dma and I cannot see why this does not work given I followed the haclogen example.

Cheers,

matt5466.HL_sys_main.c

  • Hi Mathew,

    Did you enable the cache? If cache is used, please configure the SRAM as write-through in MPU settings.

  • Hi QJ,

    Thanks for the quick reply. In HALCOgen I configured section 15 as shown in attached screen shot. This section I used as shared RAM and I believe the cache is disabled there. In my main.c I used pragma to make sure my RX_DATA buffer is in the shared RAM section. Is there anything else I could be missing? For instance, are there specific settings that need to be configured in the sci driver that I'm missing? I also enabled the DMA_BTC and sci3 high and low interrupts. My program seems to get past the point of while(dmaGetInterruptStatus(DMA_CH0, BTC) != TRUE);   however the data in RX_DATA is incorrect and does not change.

    matt

    /*----------------------------------------------------------------------------*/
    /* Memory Map */

    MEMORY
    {
    /* USER CODE BEGIN (2) */
    VECTORS (X) : origin=0x00000000 length=0x00000020 fill = 0xffffffff
    FLASH0 (RX) : origin=0x00000020 length=0x001FFFE0 fill = 0xffffffff
    FLASH1 (RX) : origin=0x00200000 length=0x00200000 fill = 0xffffffff
    STACKS (RW) : origin=0x08000000 length=0x00001500
    RAM (RW) : origin=0x08001500 length=0x0007DB00
    SHAREDRAM (RW) : origin=0x0807F000 length=0x00001000
    ECC_VEC (R) : origin=0xf0400000 length=0x4 ECC={ input_range=VECTORS }
    ECC_FLA0 (R) : origin=0xf0400000 + 0x4 length=0x3FFFC ECC={ input_range=FLASH0 }
    ECC_FLA1 (R) : origin=0xf0440000 length=0x40000 ECC={ input_range=FLASH1 }
    /* USER CODE END */

    /* USER CODE BEGIN (3) */
    /* USER CODE END */
    }

    /* USER CODE BEGIN (4) */
    ECC
    {
    algo_name : address_mask = 0xfffffff8
    hamming_mask = R4
    parity_mask = 0x0c
    mirroring = F021
    }
    /* USER CODE END */


    /*----------------------------------------------------------------------------*/
    /* Section Configuration */

    SECTIONS
    {
    /* USER CODE BEGIN (5) */
    /* USER CODE END */
    .intvecs : {} > VECTORS
    .text align(32) : {} > FLASH0 | FLASH1
    .const align(32) : {} > FLASH0 | FLASH1
    .cinit align(32) : {} > FLASH0 | FLASH1
    .pinit align(32) : {} > FLASH0 | FLASH1
    .bss : {} > RAM
    .data : {} > RAM
    .sysmem : {} > RAM

    /* USER CODE BEGIN (6) */
    .sharedRAM : {} > SHAREDRAM
    /* USER CODE END */
    }

    /* USER CODE BEGIN (7) */
    /* USER CODE END */


    /*----------------------------------------------------------------------------*/
    /* Misc */

    /* USER CODE BEGIN (8) */
    /* USER CODE END */
    /*----------------------------------------------------------------------------*/

  • Hello,

    I read your code and don't find the problem on DMA setting, SCI configuration, etc.

    Please be aware of that the SCI3 TX/RX signals are multiplexed with N2HET signals. Make sure the pinmux is set correctly.

  • Thanks for taking the time to check the code QJ. I doubled checked the pinMUX and I do not have any conflicts. I was able to get the example code to work in loopback mode but not in any other configuration. When I have it working in loopback mode I did not enable the DMA BTC interrupt or the sci interrupts. What is the proper configuration of the interrupts, do any of them need to be enabled for the DMA to work? Why would this not work with loopback disabled? I made sure to have an external connection between sci3 and sci4.

    Thanks,

    matt

  • Hi QJ,

    How can I request more help from TI regarding this issue, perhaps a webex/skype? I have not been able to find any documentation or working example from TI regarding receiving data over sci using the DMA. The example code does not work with loopback disabled. Are you able to make the example code work on the development board with loopback disabled? If so, I would really like to know what exactly makes it work; a webex would be helpful.

    Thanks,

    matt

  • Hello Matt,

    We are discussing those question in another thread. I will close this thread. Thanks