How to create user application and/or test module for flexSPI flash memories?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to create user application and/or test module for flexSPI flash memories?

806 Views
priyank_bhatt
Contributor III

Hello

We are working on iMX8QXP processor and using Yocto with L5.4.24_2.1.0. We are able to communicate to micron flash(mt35xu512aba) present on the MEK board.

Our target is to make a user application or a kernel module to test flash memory.

What I have tried:

1. Created a test module inside /drivers/spi/, made necessary changes in Kconfig, Makefile and it was up and running. I then included spi-mem.h to use "spi_mem_exec_op" function to communicate to flash chip but I am facing issues while inserting this module.

2. I created an external module in my recipe which does the same thing but faced same errors

 

The error I am facing is related to struct spi_nor/struct spi_mem which I need to pass as an argument in all spi-mem functions.

I know that we can use sysfs to access GPIOs but I did not find any examples related to SPI flash memories access usign sysfs.

Is there any way I can create a user application or a kernel module to communicate to flash using different commands supported by that flash?

Any examples related to this would be much helpful.

 

Thank you

Priyank

0 Kudos
3 Replies

801 Views
igorpadykov
NXP Employee
NXP Employee

Hi priyank_bhatt

 

one can look at flexspi examples in M4 SDK_MEK-MIMX8QX

https://mcuxpresso.nxp.com/en/welcome

 

Best regards
igor

0 Kudos

798 Views
priyank_bhatt
Contributor III

Hi @igorpadykov 

Thank you for a quick reply.

The thing is that we are not using SDK. We want to create a kernel module/application to test flash performance.
I have tried to make a module by exporting the struct spi_nor object and struct spi_mem object but that did not work.
Any other way around to do this?

 

Thank you

Priyank

0 Kudos

795 Views
igorpadykov
NXP Employee
NXP Employee

 

Hi Priyank

 

one can look at below link how create own application in linux

http://www.variwiki.com/index.php?title=IMX_Hello_World

 

Best regards
igor

0 Kudos