[CLOSED] SPI-DMA on RT1176 with embOS

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [CLOSED] SPI-DMA on RT1176 with embOS

    1. Which embOS do you use?
    embOS 5.10.1.0. with IAR workbench 8.50.
    2. Which CPU and eval board do you use?
    NXP RT1176 with MxRT1170-EVK.
    NXP SDK2.9


    Hello,
    I post here because i have a problem with the SPI-DMA associated with embOS in my microcontroller.
    I use the RT1176 on the MxRT1170-evk.

    I explain :
    i start with the example : edma_b2b_transfer in master mode without OS => it works fine on the microcontroller, i can see my SPI datas on my pins with a logic analyzer.

    I copy all the file "lpspi_edma_b2b_transfer_master.c" in a function and call it in my project wih embOS.
    I add "NVIC_SetPriority(DMA0_DMA16_IRQn, (1u << __NVIC_PRIO_BITS) - 3u); " and " NVIC_SetPriority(DMA1_DMA17_IRQn, (1u << __NVIC_PRIO_BITS) - 3u); " in order to set a priority to my DMA IT => i see nothing on my pins with a logic analyzer because i am block in while (!isTransferCompleted), line 125 i attach the file with my function

    I hope that i have forgotten one thing when i integrate it with embOS, but i do not arrive to find what.

    Thanks very much for your help.
    Loic
    Files
  • Hi Loic,

    Sorry for the late reply.

    I am not familiar with the DMA/SPI of the iMXRT1170 but I assume that the communication via SPI should be observable with the logic analyzer as soon as LPSPI_MasterTransferEDMA() is called in line 122, correct? That means the actual issue is that the DMA/SPI transfer is not started, and not that the DMA/SPI transfer completed interrupt is not occurring, correct?

    However, with embOS peripherals can be used the same way as without an OS. Thus, it should work the same as in the example from NXP, assuming that the device is initialized the same.

    Are you using the iMXRT1176_M7_MIMXRT1170_EVK BSP from the embOS shipment, and are you calling dmaspi_example() from a task?
    If so, could you please try to call dmaspi_example() from the main() routine without calling any embOS functions and check if that works?
    It might be that the startup code (e.g. SystemInit()) in the NXP example performs some initialization which is different than the initialization in our BSP.

    Also, don't hesitate to contact us via our ticket system in order to receive the fastest possible support:
    segger.com/support/technical-support/

    Best regards,
    Michael
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Hello Michael,
    Thanks for your reply.

    SEGGER - Michael wrote:

    Are you using the iMXRT1176_M7_MIMXRT1170_EVK BSP from the embOS shipment, and are you calling dmaspi_example() from a task?
    Yes i use the iMXRT1176_M4_MIMXRT1170_EVK bsp.
    Yes i call the function in a task. We have 7 tasks in our project with different priorities.

    SEGGER - Michael wrote:

    If so, could you please try to call dmaspi_example() from the main() routine without calling any embOS functions and check if that works?
    I try it : it works fine if i call the function directly in the main without doing anything. it was a good idea.

    SEGGER - Michael wrote:

    It might be that the startup code (e.g. SystemInit()) in the NXP example performs some initialization which is different than the initialization in our BSP.
    No, function "SystemInit" is exactly the same in the NXP project and in the BSP.
    Have you got an other idea ?

    Thanks very much.

    Loic

    The post was edited 2 times, last by LoicB73000 ().

  • Hello Loic,

    since you've opened an embOS support ticket, I will close this thread for now and continue the support using the support ticket system.

    Best regards,
    Michael
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.