Hi,
If have a problem reading from the data partition
I used xflash to write a piece of data in the flash, when i (with xflash) read the contents in flash, the data is on the memory location i expected
in mine application (which i test in xtime composer with run or debug) when is do a fl_readdata it returns the value on memory location zero, the start of the boot section.
When i query the size of the data partition it return 0.
What can be the cause of this, and how does fl_read know what where the data partition starts. or must i run the application from flash?, if i run it from flash can i than stil print information to the xtime console?
King Regards
Niels Braspenning
fl_readdata and data partion
-
- Member
- Posts: 13
- Joined: Mon Feb 27, 2017 11:34 pm
-
- Active Member
- Posts: 55
- Joined: Fri Mar 04, 2011 3:38 pm
Hi Niels,
If an offset of zero is passed to fl_readdata, it should read from the start of the data partition, not from the start of flash/boot partition, as the documentation states:
Please could you share the exact command you are using to write the data partition to your flash?
Cheers,
Sam
If an offset of zero is passed to fl_readdata, it should read from the start of the data partition, not from the start of flash/boot partition, as the documentation states:
Are you saying this differs from the behaviour you are seeing?int fl_readData (unsigned offset,
unsigned size,
unsigned char dst[])
Reads data from the data partition.
Parameters:
offset The offset from the start of the data partition in bytes.
size The number of bytes to read.
dst Array to fill with data.
Returns:
0 on success, non zero on failure.
Please could you share the exact command you are using to write the data partition to your flash?
Cheers,
Sam