SPI flash security register issue - Page 1
Forum section: electronics / general

author: myval
author_rank: Contributor
timestamp: January 13, 2021, 10:25:22 pm
content: HiI am just wondering if someone could point me in the right direction.I have built boards with UP5K’s, I have three boards one works sweet as expected and two works but will not send data storred in security registers.Same batch PCBS same batch ICE same batch AT25SF081 same same same same copy of the bitstream same copy of security registers just same but I dont get any data from security registers back from two boards and one board is OK.I even swapped programmed flash chips. I hit the wall and have no idea what to do next.Would any of you have any idea what the hack?I am running TinyFPGA bootloader which stores booltloader settings in security registeres, tho board boots ok into bootloader and it talks to the PC when I tell it to reboot into user bitstream it obeys and works fine but I can not use bootloader since the bootloader does not know who he is and what to do.Schematics is the same as tinyFPGA BX except ice40UP5K on board and all the necessary pin changes and pll changes to go with up5k.I am guessing it is something to do with deep power down when 0xab gets sent in it shoud wake up but it does not I guess and I can not see anything else in the datasheet or I might be focussed on something totally wrong and it is in something else.here are two pics of the scope capture one is the good board with violet trace in action and the other the board which loads the config loads the Tinybootloader connects to the PC when I send -l I get board connected but no meta.Violet trace is SO form the Flash

author: mon2
author_rank: Frequent Contributor
timestamp: February 03, 2021, 08:57:04 am
content: Did you get this resolved?Are you required to use this specific flash device?Can you test with another like Winbond?

author: myval
author_rank: Contributor
timestamp: February 03, 2021, 12:03:53 pm
content: Hi,yeah I got it resolved (I hope). I have spent days on the problem and I was so desperate that I showed those scope caps to my girlfriend and she solved it.if you look at I think the bottom pic (I can not see it now) there are some notches on the clock line. So out of desperacy I shoved few pF cap on the clock line and guess what it has fixed it. I thought it is ofcourse stupid to leave cap there so I dag into pin settings in the FPGA and after properly instantiating SPI pins in tinyFPGA bootloader it worked like a charm. So what and why exactly beats me.

author: mon2
author_rank: Frequent Contributor
timestamp: February 03, 2021, 02:35:13 pm
content: Interesting. A few years ago we did a deep review of QSPI flash devices with the XMOS CPUs. In short, found that not all flash vendors behave the same. The length of the cable / trace lengths varied a great deal. Back then, found that spansion devices had the best pin drive strength. Tested with zero plus logic analyzer with shielded cables for the device under test. You can try other vendors but sounds like it is local to the layout and/or flash component.

author: myval
author_rank: Contributor
timestamp: February 03, 2021, 03:02:23 pm
content: I guess it is combination of the board and ICE40UP5K since the same flash is used on Luke's TinyFPGA BX and it works he use different ICE and has slightly different board layout at the Flash interface.I think it is the actual pin drives in UP5K there are little differences compared to what is in TinyFPGA BX.