Hi,
I was programming a rounting for calculation the size of the used memory.
For this I´m writing 6bytes at the beginn (adress 0x00) of the flash memory array. After this i start a read funktion at the adress 0x07FFFA and read 12 bytes. In the datasheet is written, if the last byte is read the memory continues reading at adress 0x000000.
If I read the adress 0x00 direct i get my 6 bytes back.
If i read 12 bytes beginn at adress 0x07FFFA is get 0xFF for every byte.
Is there some special condition to reset the internal adress counter of the memory, if the last byte was read?
Hi,There is no special condition to reset the internal address counter of the memory, after the last byte was read.That is because, the Read Array command can be used to sequentially read a continuous…
I solve the problem.
It was a problem with the addressing. My compiler make something strange with the address.
Reads a sequence of bytes from the current memory stream and advances the position within the memory stream by the number of bytes read.Tell The Bell
Hi Josh69,
if you click on the image further up, you will see the hole stream with 12 Byte read.
Please clarify as to why your clock is not continuous?
Just to check:
Write some bytes starting at 0x07FFFA to the end : 0x01, 0x02, 0x03, 0x04, 0x05, 0x06
Then, Can you run a continuous loop as follows just to check things up =>
Drive CS LOW.
Keep CLOCK ON all the time.
Send op code 0x03
Send 0x00 three times (24 bits)
Keep CLOCK active
Let the loop continue.
See what it does.
Does it read the last 6 bytes?
Does it wrap around at all? What happens after it reaches last address?
Let me know.
Thanks
Also, keep the CS LOW while running the READ loop.
about the clock. My SPI is interrupt controled, with an low priority interrupt. If a byte is received the interrupt is triggert to read the SPI FIFO and start send out the next clocks for the next byte. Because it is a low priority interrupt is is possible that 3 other interrupt are triggert during the interrupt activ time of the SPI interrupt.
If i read address 0x00 to 0x06 i get the correct bytes.
For read operation i use the opcode 0x03.
I write from 0x07FFFA to 0x07FFFF the data 0x01, 0x02, 0x03, 0x04, 0x05, 0x06.
I can read back the data i write before but the 7 byte is not correct.