Flash W25 reading doesn't work

Any bugs you encounter with Flowcode should be discussed here.
Osta
Posts: 53
http://meble-kuchenne.info.pl
Joined: Thu Dec 10, 2020 1:12 pm
Has thanked: 1 time
Been thanked: 3 times

Flash W25 reading doesn't work

Post by Osta »

Hello I use Atmega128 processor and AT25F4096 memory.
Writing to memory works correctly but reading always returns 1.
Attachments
W25.fcfx
3
(16.37 KiB) Downloaded 89 times
2
2
W25.jpg (45.27 KiB) Viewed 3280 times
1
1
Prog.jpg (28.79 KiB) Viewed 3280 times

Osta
Posts: 53
Joined: Thu Dec 10, 2020 1:12 pm
Has thanked: 1 time
Been thanked: 3 times

Re: Flash W25 reading doesn't work

Post by Osta »

Found my mistake, but the question remains...
Attachments
W25.fcfx
(17.71 KiB) Downloaded 93 times
2.jpg
2.jpg (43.63 KiB) Viewed 3262 times
1.jpg
1.jpg (36.81 KiB) Viewed 3262 times

BenR
Matrix Staff
Posts: 1739
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 440 times
Been thanked: 603 times

Re: Flash W25 reading doesn't work

Post by BenR »

Hello,

You might need to erase the block first before you try and program the location. Though 255 would potentially indicate an unprogrammed location.

Osta
Posts: 53
Joined: Thu Dec 10, 2020 1:12 pm
Has thanked: 1 time
Been thanked: 3 times

Re: Flash W25 reading doesn't work

Post by Osta »

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.
Attachments
MEM.fcfx
(24.05 KiB) Downloaded 83 times
1
1
Ind.jpg (91.51 KiB) Viewed 3206 times

BenR
Matrix Staff
Posts: 1739
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 440 times
Been thanked: 603 times

Re: Flash W25 reading doesn't work

Post by BenR »

Hello,

What do you have the WP pin connected to?

Osta
Posts: 53
Joined: Thu Dec 10, 2020 1:12 pm
Has thanked: 1 time
Been thanked: 3 times

Re: Flash W25 reading doesn't work

Post by Osta »

WP connected to VCC
Attachments
Mem25.jpg
Mem25.jpg (119.18 KiB) Viewed 3190 times

Osta
Posts: 53
Joined: Thu Dec 10, 2020 1:12 pm
Has thanked: 1 time
Been thanked: 3 times

Re: Flash W25 reading doesn't work

Post by Osta »

Everything works in Proteus but not in hardware.
If connected according to the data sheet, the MISO and MOSI pins are reversed

Osta
Posts: 53
Joined: Thu Dec 10, 2020 1:12 pm
Has thanked: 1 time
Been thanked: 3 times

Re: Flash W25 reading doesn't work

Post by Osta »

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

Osta
Posts: 53
Joined: Thu Dec 10, 2020 1:12 pm
Has thanked: 1 time
Been thanked: 3 times

Re: Flash W25 reading doesn't work

Post by Osta »

Moreover, the program makes one iteration and stops at one of the commands.

Osta
Posts: 53
Joined: Thu Dec 10, 2020 1:12 pm
Has thanked: 1 time
Been thanked: 3 times

Re: Flash W25 reading doesn't work

Post by Osta »

It's in PROTEUS.
Attachments
Proteus
Proteus
Proteus.jpg (150.27 KiB) Viewed 3186 times

Post Reply