cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
andreac_avnet
Explorer
Explorer
1,358 Views
Registered: ‎05-03-2018

QSPI not fully erasing

Jump to solution

Dear all,
I will try to give you a brief description of what we find in the QSPI cancellation process.
Vivado Version: 2016.4
OS: Linux

Our attempt is to erase everything in it, then reprogram the project .bin.
Leaving unprepared other contents of the QSPI,
which we would like to eliminate from its content.
So we expect that our project will be loaded on the next restart,
but a series of values ​​written in the QSPI from another procedure independent from the .bin are at the default value.

Here's what I do:

Using the Digilent cable with Vivado 2016.4 for Linux, I open Hardware Manager and connect to the target (Refer to Picture 1)

Then I choose "Add Configuration Memory Device" with the right click on xc7C035_1,
and select the QSPI memory that we have on the board. (Refer to Picture 2).

I answer OK to the programming request and ask to do only ERASE and BLANK CHECK,
choosing "Entire Configuration memory Device". (Refer to Picture 3).

The operation takes several minutes, apparently it is successful, the vivado log is attached (Refer to vivado_erase.log).

I go out of Vivado, I turn off the whole system (PC and board).
I restarted everything, expecting to find the canceled QSPI.
Since the board is configured to boot from QSPI, I expect to find the FPGA not configured ...

And in fact, restarting everything and opening Hardware manager, I find that the FPGA is not programmed.

So I try to program only .bin.

Re-add the QSPI as done before and program it as follows (Refer to Picture 4).

This time I say to do only program and verify and to use only the addresses for the area of ​​the configuration file,
because I imagine that this should leave the rest of the unplanned QSPI (am I wrong?)

I continue despite the recommendation to enable deletion.

The programming log is attached (Refer to vivado_program.log).
Everything seems OK.

The board remained with the INIT LED on.

I reset the board and ... the UART gives me back, among other things, the following values ​​read by the QSPI:

...
...
Spansion 256Mb Parallel: 67108864 Bytes.
Reading Data from QSPI into DDR3 at 0x0 ... Complete
Calculating CRC32 ... Complete:
Calculated Data CRC = 0xE2B35237
DDR DATA CRC = 0xE2B35237
CRC Matches
Writing CAL Data to DPS registers
Writing DPS REG 0x43C10024: 0x0000FFF7
Writing DPS REG 0x43C10028: 0x00008016
Writing DPS REG 0x43C10330: 0x00010017
Writing DPS REG 0x43C10334: 0x00008012
Writing DPS REG 0x43C10338: 0x00010000
Writing DPS REG 0x43C1033C: 0x0000FF19
Writing DPS REG 0x43C10340: 0x000100DD
Writing DPS REG 0x43C10344: 0x00010017
Writing DPS REG 0x43C10348: 0x00010084
Writing DPS REG 0x43C1034C: 0x000101D3
...
...
Writing DPS REG 0x43C30364: 0x00008333
Writing DPS REG 0x43C30368: 0x000082BA
Writing DPS REG 0x43C3036C: 0x000082AE
Writing DPS REG 0x43C30374: 0x0000FFFA
Writing DPS REG 0x43C30378: 0x00007FC4
DPS CAL Function Complete
QSPI DPS CAL Succeeded
...
...

The values ​​read by the QSPI are the ones we hoped to have canceled.

For this reason we have the doubt that the QSPI has not really been canceled.

Am I doing something wrong ?
Can you please help me ?

Thanks in advance for your help.
Best regards,
Andrea

Tags (3)
Picture 1.jpg
Picture 2.jpg
Picture 3.jpg
Picture 4.jpg
0 Kudos
1 Solution

Accepted Solutions
iguo
Xilinx Employee
Xilinx Employee
1,253 Views
Registered: ‎08-10-2008

I was completely confused. What did you mean by following:

there is more information in the QSPI area starting at 0x03fe0000.
This information does not come from the project .bin.
And they are the ones we wanted to delete.

we ... restoring the .bin

If you erase the whole flash, the flash will be blanked when you select erasing 'whole' device. A blank check can confirm this. Then you restore the bin file, and some info appear again. Are you sure these info is not contained in the bin file? Also make sure when the bin starts to work, it did not fetch these info from somewhere and program it into QSPI.

I can't think of other possibilities.

Please correct me if I understand wrong.

 

If by chance the wrong QSPI model, for example the wrong size or some other parameter that affects the parallelism of access to the QSPI, could I delete only the initial part and not the "high" addresses, without incurring errors reported by the tool?

-> You can generate a small config file, say, a compressed one, assign it to flash, and then select 'Address Space-> Configuration file only', and then perform Erase. The tool will only run operations on the range of the file size.

------------------------------------------------------------------------------------------------------------
Don't forget to reply, kudo, and accept as solution.
---------------------------------------------------------------------------------------------------------

View solution in original post

7 Replies
iguo
Xilinx Employee
Xilinx Employee
1,326 Views
Registered: ‎08-10-2008

Is it a Xilinx board or a custom board? If the former, which one?

------------------------------------------------------------------------------------------------------------
Don't forget to reply, kudo, and accept as solution.
---------------------------------------------------------------------------------------------------------
andreac_avnet
Explorer
Explorer
1,320 Views
Registered: ‎05-03-2018

Dear @iguo,
It's a custom board.

Let me add some infos:

The QSPI is used to store the project .bin, starting from the address 0x00000000.
Instead, the information we would like to delete is in the QSPI starting at address 0x03fe0000.

What I was expecting is that, telling Vivado to delete the entire address range, that information would also be erased.
Instead, after having restored the .bin, we still find them there.

- Is it possible that Vivado does not notice the whole area, besides a certain address?
- Is it normal that when I open the Hardware manager the QSPI is not seen "automatically" by Vivado and that I have to tell him manually what is the configuration device?
- Is it possible to use SDK instead of Vivado to delete the QSPI, specifying the addresses to be deleted?

Thanks in advance for your help.
Andrea

0 Kudos
iguo
Xilinx Employee
Xilinx Employee
1,301 Views
Registered: ‎08-10-2008

Hi,

1. No. If you select the whole flash to erase, the whole flash must be erased. Do you mean you ran a whole erase, but the bootloader section was still there (0x0~0x3fdffff) and then print info through UART, and these info was defined in the bootloader?

2. This is normal. You should manually add the flash.

3. Yes. SDK could do this work as well.

 

------------------------------------------------------------------------------------------------------------
Don't forget to reply, kudo, and accept as solution.
---------------------------------------------------------------------------------------------------------
andreac_avnet
Explorer
Explorer
1,285 Views
Registered: ‎05-03-2018

Hi @iguo,
Here's the answer to your question 1.
(...) 
Do you mean you ran a whole erase,
but the bootloader section was still there (0x0~0x3fdffff) and then print info through UART,
and these info was defined in the bootloader?
(...)

- The boot area of ​​the QSPI (from 0x00000000 to 0x03fdffff) is correctly deleted,
the reboot is not rebooted and the board does not restart.
Then, restoring the .bin of our project via JTAG, everything works again.
So far, everything is ok.
 
But there is more information in the QSPI area starting at 0x03fe0000.
This information does not come from the project .bin.
And they are the ones we wanted to delete.
After deleting and restoring the .bin, when the system reboots,
the firmware running on the ARM accesses that area to read the information from the QSPI.

From the output of the UART we understand that the information read is that prior to the cancellation.
We did not expect it.
 
I also ask another question to you:
If by chance the wrong QSPI model, for example the wrong size or some other parameter that affects the parallelism of access to the QSPI, could I delete only the initial part and not the "high" addresses, without incurring errors reported by the tool?

Thanks in advance for your help.
Best regards,
Andrea

0 Kudos
andreac_avnet
Explorer
Explorer
1,258 Views
Registered: ‎05-03-2018

Dear  @iguo , do you have anyupdates about my last reply ?

Best regards,
Andrea

0 Kudos
iguo
Xilinx Employee
Xilinx Employee
1,254 Views
Registered: ‎08-10-2008

I was completely confused. What did you mean by following:

there is more information in the QSPI area starting at 0x03fe0000.
This information does not come from the project .bin.
And they are the ones we wanted to delete.

we ... restoring the .bin

If you erase the whole flash, the flash will be blanked when you select erasing 'whole' device. A blank check can confirm this. Then you restore the bin file, and some info appear again. Are you sure these info is not contained in the bin file? Also make sure when the bin starts to work, it did not fetch these info from somewhere and program it into QSPI.

I can't think of other possibilities.

Please correct me if I understand wrong.

 

If by chance the wrong QSPI model, for example the wrong size or some other parameter that affects the parallelism of access to the QSPI, could I delete only the initial part and not the "high" addresses, without incurring errors reported by the tool?

-> You can generate a small config file, say, a compressed one, assign it to flash, and then select 'Address Space-> Configuration file only', and then perform Erase. The tool will only run operations on the range of the file size.

------------------------------------------------------------------------------------------------------------
Don't forget to reply, kudo, and accept as solution.
---------------------------------------------------------------------------------------------------------

View solution in original post

iguo
Xilinx Employee
Xilinx Employee
1,251 Views
Registered: ‎08-10-2008

I notice you have Avent in your id. If you are a DFAE or you can contact a DFAE, you can file a SR to Technical Support. Elaborate the issue and maybe you can provide your files for checking.

------------------------------------------------------------------------------------------------------------
Don't forget to reply, kudo, and accept as solution.
---------------------------------------------------------------------------------------------------------