Hello I use Atmega128 processor and AT25F4096 memory.
Writing to memory works correctly but reading always returns 1.
Flash W25 reading doesn't work
-
Osta
- Posts: 60
- http://meble-kuchenne.info.pl
- Joined: Thu Dec 10, 2020 1:12 pm
- Has thanked: 1 time
- Been thanked: 5 times
Flash W25 reading doesn't work
- Attachments
-
- W25.fcfx
- 3
- (16.37 KiB) Downloaded 662 times
- (view online)
-
- 2
- W25.jpg (45.27 KiB) Viewed 8996 times
-
- 1
- Prog.jpg (28.79 KiB) Viewed 8996 times
Re: Flash W25 reading doesn't work
Found my mistake, but the question remains...
- Attachments
-
- W25.fcfx
- (17.71 KiB) Downloaded 621 times
- (view online)
-
- 2.jpg (43.63 KiB) Viewed 8978 times
-
- 1.jpg (36.81 KiB) Viewed 8978 times
-
BenR
- Matrix Staff
- Posts: 2334
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 647 times
- Been thanked: 856 times
Re: Flash W25 reading doesn't work
Hello,
You might need to erase the block first before you try and program the location. Though 255 would potentially indicate an unprogrammed location.
You might need to erase the block first before you try and program the location. Though 255 would potentially indicate an unprogrammed location.
Re: Flash W25 reading doesn't work
Erasing does nothing!
Cleaning up didn't do anything either.
Made a write / read loop and the loop stops.
the program hangs. Recording doesn't work.
Only reading works.
Cleaning up didn't do anything either.
Made a write / read loop and the loop stops.
the program hangs. Recording doesn't work.
Only reading works.
- Attachments
-
- MEM.fcfx
- (24.05 KiB) Downloaded 598 times
- (view online)
-
- 1
- Ind.jpg (91.51 KiB) Viewed 8922 times
-
BenR
- Matrix Staff
- Posts: 2334
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 647 times
- Been thanked: 856 times
Re: Flash W25 reading doesn't work
When connected according to the datasheet, there is not even a read.
And if the pins MOSI and MISO swap places, the chip returns 255. This is the default value.
In the program you can see that I set the value to 0 and the return value to 255. So the reading is done. But the sector is not unlocked and therefore not written.
Respectfully Osta
And if the pins MOSI and MISO swap places, the chip returns 255. This is the default value.
In the program you can see that I set the value to 0 and the return value to 255. So the reading is done. But the sector is not unlocked and therefore not written.
Respectfully Osta