K82F erase/program flash while execute firmware in QSPI flash

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

K82F erase/program flash while execute firmware in QSPI flash

1,146 Views
kyleyang
Contributor IV

Hi

I built a toggle LED and erase/program external flash when button pressed.

I updated the image via KBOOT QSPI interface success and LED toggle works.

But when I pressed the button and try to erase/program QSPI flash, it will failed after program access.

Is there any idea that can help resolve this issue?

Thanks.

Labels (1)
Tags (3)
0 Kudos
4 Replies

691 Views
calvinday
Contributor III

I had the same problem. Remember:

1. Set FLASH_DRIVER_IS_FLASH_RESIDENT=1.

2. disable interrupts.

0 Kudos

691 Views
ethan_cheng
NXP Employee
NXP Employee

Hi Kyle,

QSPI controller needs to be initialized and flash operation function (ERASE and PROGRAM) need to be implemeted as RAM FUNCTION. And disable cache befor flash operation execution.

Attached the sample code for your reference.

Best regards,

Ethan

0 Kudos

691 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Kyle Yang,

I need more details to understand your issue.

- Are you using an NXP evaluation board or custom board?

You mentioned:

But when I pressed the button and try to erase/program QSPI flash, it will failed after program access.

- Exactly what button are you pressing?

- What do you mean with "failed after program access"?

If possible please also share your LED example project.

Regards!

Jorge Gonzalez

0 Kudos

691 Views
kyleyang
Contributor IV

Hi Jorge Gonzalez,

I am using FRDM-K82F + KSDK2.1 for QSPI test based on the "qspi_polling_transfer".

I attached my project code and BD file for your reference.

I move the QSPI W/R related code to access at RAM.

Now ERASE is working, but write will not functional correct.

0 Kudos