basics of flash usage?

If you have a simple question and just want an answer.
woodsb
Experienced Member
Posts: 79
Joined: Thu Nov 17, 2016 11:24 pm

basics of flash usage?

Post by woodsb »

Hello:

I have been experimenting with flash usage on a custom board based on the XUF216-512-TQ128 device. The board has developed some flaky behavior and I am wondering if I violated some constraint with regard to using the flash. I am untrained in embedded programming so hope someone has some time for some naive questions. I put a bunch below and hope this is not the wrong place for advice on this. If the info is already covered somewhere else, I'd be happy to look into the material on my own if a link could be provided.

I am using Version: Community_14.3.3 (build 22296, Apr-19-2018) on Ubuntu 16.04.

sincerely,
woodsb

What happens when I hit the "run" button in the Xtimecomposer IDE (button with white arrow on green background)? I thought the IDE loaded the selected program into the device RAM and told the device to start running. That is, there should be no flash usage involved so even if the flash were corrupted I could still run my program this way.

In various sources, such as AN00189, there is a diagram of the flash format showing a hardware protected flash loader and factory image. What does "hardware protected" mean? How can I find out how large this region is? Is it possible to corrupt a flash device by specifying a boot partition size that is smaller than this region or smaller than the total of size of loader and factory image?

When I execute "xflash --read-all" from a terminal on my flaky board and write the output to a file I've noticed the file grows over time to a certain size that is a small fraction of the expected 2MB size and stops growing, and the command never seems to terminate in the terminal. The command works fine with an earlier version of the board that does not show the flakiness. Is this an undeniable sign of a corrupted flash, or could something else on the board cause this problem? If a corrupted flash, what might the flash problem be and how could it have occurred? That is, could it be somehow avoided or prevented in the future?

What does this warning mean: "Warning: F03098 Factory image and boot loader cannot be write-protected on flash device on node 0"? And, why might it be important to know? This comes up when I use the IDE to flash a program. When I flash a program with the IDE, is the program flashed as the "factory image", along with some generic boot loader?