Combining FileX with other functionality on QSPI


We would like to combine the functionality of FileX with other functionality on the same QSPI FLASH using Synergy SSP version 2.1.0 and above. We use an S5D9.

How would one go about this? How can we make sure FileX does not interrupt write/read/erase operations done by other parts of the program that also need the QSPI flash? We currently have three seperate uses for it (including file managament) that may all use the QSPI flash.

  • Hello dear user, thank you for posting to the Renesas community.

    If other parts of the program are not trying to manipulate the memory section that is used by FileX, probably there might not be a problem.
    you just need to use a common reentrant driver for read/write on Flash, then implement some priority and atomic functionality (utilizing mutex and semaphores) so that whenever two different tasks are trying to access the QSPI bus, the task with higher priority (FileX task) takes control and the lower one waits.
    In this way, there should not be a problem. 

    customize your flash driver in this way and see if it's working properly or not. 
    I hope you find that helpful, don't hesitate to ask for clarification if needed. 

    Kind regards, 


    If this or any other user's response answers your concern, kindly verify the answer. Thank you!

    Renesas Engineering Community Moderator

  • Hossein,

    Thanks for the answer. By "common reentrant driver", do you mean using the same driver for all operations on QSPI Flash? I am also unsure how to properly configure the whole FileX/LevelX stack to only use one part of my drive. It seems to be possible with LevelX.

    EDIT: post originally contained some images of my SSP stack configuration, has been removed for clarity's sake.

    It turns out the fx_media driver supplied by the Renesas configuration also opens the QSPI driver. However, when attempting to open the driver again, it will return an SSP_ERR_IN_USE error... even though normally it returns an SSP_ERR_ALREADY_OPEN error.
    Luckily the one driver can still be used for other functionality as long as you do not attempt to open or close the driver while fx_media is open.

    Just use the API for writing, erasing AND reading and it will all work with the same QSPI driver. As far as I know this is an undocumented side-effect of using fx_media on QSPI.
    Do not bother with LevelX on SSP 2.2.0, it will not work out of the box with QSPI. I had to edit an auto-generated .h file to include the proper file and then set it to read-only. After that the LevelX initialization with formatted media just causes errors.

  • Hi, thank you for sharing your experience. Happy coding :) 

Reply Children
No Data