Skip to main content
Explorer
June 20, 2023
Solved

DMA Configuration for FileX to access MX25LM51245G on the B-U585I-IOT02A Development Kit

  • June 20, 2023
  • 2 replies
  • 1416 views

Created an Azure RTOS project to have FileX access the MX25LM51245G NOR flash memory in the B-U585I-IOT02A discovery kit. Configured LevelX for OCTOSPI2 and MX25LM51245G as the OSPI component. Enabled DMA Channel 12 with a linear linked list. Linked OCTOSPI2 to the DMA channel with the following call in main.c: hospi2.hdma = &handle_GPDMA1_Channel12; 

The code runs until the call into the HAL_OSPI_Receive_DMA() function (stm32u5xx_hal_ospi.c). It fails on the if for p_queue which appears to be null. It there something else that needs to be configured or created in code?

    This topic has been closed for replies.
    Best answer by KDJEM.1

    Hello @SLimi.1 ,

    I advise you to start from an available example. 

    For that I recommend you to take a look to this Fx_NoR_Write_Read_File example running on B-U585I-IOT02A board. This application provides an example of Azure RTOS FileX and LevelX stacks usage on B-U585I-IOT02A board, it demonstrates how to create a Fat File system on the NOR flash using FileX alongside LevelX. The application is designed to execute file operations on the MX25LM51245G NOR flash device.

    Thank you.

    Kaouthar

    2 replies

    KDJEM.1Answer
    Technical Moderator
    June 20, 2023

    Hello @SLimi.1 ,

    I advise you to start from an available example. 

    For that I recommend you to take a look to this Fx_NoR_Write_Read_File example running on B-U585I-IOT02A board. This application provides an example of Azure RTOS FileX and LevelX stacks usage on B-U585I-IOT02A board, it demonstrates how to create a Fat File system on the NOR flash using FileX alongside LevelX. The application is designed to execute file operations on the MX25LM51245G NOR flash device.

    Thank you.

    Kaouthar

    SLimi.1Author
    Explorer
    June 20, 2023

    Thank you. The problem configuring the correct DMA channel to 0 and performing a Standard Request Mode. Then set the Request to OCTOSPI2 did the trick.