cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Participant
Participant
578 Views
Registered: ‎06-26-2019

Problem Erasing/Writing QSPI Flash

Dear,

I am working on a system that multiplex the QSPI flash n25q256a(mt25qu256), with an MPSOC and petalinux 2017.1. When I try to updated the primary flash using flashcp or mtd_debug I don't have any problem. Then I switch the multiplexer and I do same operation, but this never work. When I do the read after the operation in the secondary flash I read the same pattern:

root@:~# hd boot.bin.dump
00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
000063f0 00 00 00 00 00 00 00 00 00 00 00 00 ff ff ff ff |................|
00006400 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
*
000073f0 ff ff ff ff ff ff ff ff ff ff ff ff 00 00 00 00 |................|
00007400 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
0001bdf0 00 00 00 00 00 00 00 00 00 00 00 00 ff ff ff ff |................|
0001be00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
*
00400000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
004023f0 00 00 00 00 00 00 00 00 00 00 00 00 ff ff ff ff |................|
00402400 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
*
004033f0 ff ff ff ff ff ff ff ff ff ff ff ff 00 00 00 00 |................|
00403400 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00417df0 00 00 00 00 00 00 00 00 00 00 00 00 ff ff ff ff |................|
00417e00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
*
00800000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00813df0 00 00 00 00 00 00 00 00 00 00 00 00 ff ff ff ff |................|
00813e00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
*
00c00000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00c0fdf0 00 00 00 00 00 00 00 00 00 00 00 00 ff ff ff ff |................|
00c0fe00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
*
01000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
0100bdf0 00 00 00 00 00 00 00 00 00 00 00 00 ff ff ff ff |................|
0100be00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
*
01400000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
01407df0 00 00 00 00 00 00 00 00 00 00 00 00 ff ff ff ff |................|
01407e00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
*
01800000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
01803df0 00 00 00 00 00 00 00 00 00 00 00 00 ff ff ff ff |................|
01803e00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
*
02000000

My question is if there is a kind of protection on the drivers maybe or on the MPSOC that not allow you to do this? read a checksum or serial number or something similiar that not allow you to touch the memory without reboot before?

Thank you in advance.

Alen.

Tags (3)
0 Kudos
6 Replies
Highlighted
Moderator
Moderator
535 Views
Registered: ‎06-27-2017

Hi @alen89 ,

As you mentioned that you are using primary and secondary, I hope you have take care about them in device tree.

I mean, have you mentioned that your configuration is dual-stacked your hw design and device tree?

Best Regards
Kranthi
--------------------------
Don't forget to reply, kudo, and accept as solution.
0 Kudos
Highlighted
Participant
Participant
528 Views
Registered: ‎06-26-2019

Hi,
I have to say that is not dual stack, the both memories are interconnected to the same Chip Select through a multiplexer.
And I don't no why I can not write the flash that is not booted to write the configuration.
Best
Alen.
0 Kudos
Highlighted
Moderator
Moderator
511 Views
Registered: ‎06-27-2017

Hi @alen89 ,

As per my knowledge, there will be single, dual-parallel and dual-stack configurations which are supported.

Could you please let me know which configuration you are using?

As you mentioned you have mux, I hope you are taking care of mux select when you try to read/write on to flash.

May I know the procedure/commands you are trying read/write?

Best Regards
Kranthi
--------------------------
Don't forget to reply, kudo, and accept as solution.
0 Kudos
Highlighted
Participant
Participant
485 Views
Registered: ‎06-26-2019

Hi,

The configuration is single. The mux selection is done by a microcontroller in the PCB external to de MPSoC.

From the MPSoC I send a command to switch the mux. And then I don't reboot before erase and write I get always the pattern that I showed in the previous post.

Regards,

Alen.

Ps: sorry for the delay to reply.

0 Kudos
Highlighted
Moderator
Moderator
457 Views
Registered: ‎06-27-2017

Hi @alen89 

Did you check writing to flash2 and read from flash1 from same mux?

Best Regards
Kranthi
--------------------------
Don't forget to reply, kudo, and accept as solution.
0 Kudos
Highlighted
Participant
Participant
450 Views
Registered: ‎06-26-2019

Hi @gudishak,

Yes, I tried in both scenarios, and it is always the same problem.

Could it be one of the drivers check some parameter in the rom of the device(SN, or another)?..

Best,

Alen.

0 Kudos