LPCXpresso SPIFI RTOS example

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

LPCXpresso SPIFI RTOS example

1,283 Views
primate
Contributor III

Hi,

I have a LPCXpresso54628 board and I was wondering does anybody have an example how to implement SPIFI into FreeRTOS? If no, any ideas how to implement it (taking the lpcxpresso54628_driver_examples_spifi_spifi_dma_transfer as a reference? 

Thank you for any help.

Labels (1)
0 Kudos
Reply
4 Replies

894 Views
jeremyzhou
NXP Employee
NXP Employee

Hi  primate

Thank you for your interest in NXP Semiconductor products and 
for the opportunity to serve you.
According to your statement, you'd like to execute the FreeRTOS task in the SPIFI flash, however the code execution performance only up to 60~70% of internal flash performance when code runs in the the SPIFI flash.
So I don't think the proposal is good.
Have a great day,
TIC
 
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
----------------------------------------------------------------------------------------------------------------------
 
0 Kudos
Reply

894 Views
primate
Contributor III

Hello jeremyzhou,

Thank you for the answer.

What would be a better solution in your opinion for using the on-board Quad-SPI flash in FreeRTOS?    

I have a project running FreeRTOS where one of the tasks is to take a user input and store it on flash (for later use). One of the inputs is also user settings which would be taken on board power-up.

Have a nice day

0 Kudos
Reply

894 Views
jeremyzhou
NXP Employee
NXP Employee

Hi primate,

Thanks for your reply.

If the SPIFI flash is just used to store some data and the internal flash is assigned the application code.

Definitely, it's available.

However you need to initialize the SPIFI flash prior to create the tasks in RTOS.

Hope it helps.

Have a great day,
TIC
 
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
0 Kudos
Reply

894 Views
primate
Contributor III

Dearjeremyzhou,

I did intialize the SPIFI (like in the DMA SPIFI example) prior to RTOS task but every time I want to write something it hangs at:

SPIFI_SetMemoryCommand(SPIFI0, &command[READ]);

BTW is that function really needed?

Jut to let you know that I have managed to port the polling SPIFI example into my RTOS project and it works relatively OK (sometimes the data is not written into memory like it should and I will need to sort out why). EDIT: looks like a vTaskDelay(5); was needed before enable_quad_mode();

To clarify even further just to see the whole picture:

  • I am using lwIP RTOS where, among other things, the user can enter some data
  • That data should then be stored into SPIFI flash
  • As for the project first everything is intialized and the lwIP task is called
    • within lwIP there is also a init function where I have put the function 
                    enable_quad_mode();

I am not sure do I need to put the that function prior to the RTOS task since it works in the RTOS SPIFI polling example. 

 If you need any more info please let me know.

0 Kudos
Reply