aboutsummaryrefslogtreecommitdiff
path: root/spiflash_n25q128.c
AgeCommit message (Collapse)Author
2017-10-15Cleanup: All drivers return HAL_StatusTypeDef rather than magic values.Paul Selkirk
Note: This affects libhal/ks_token.c, which uses the keystore driver directly.
2017-02-22Refactor flash code.Paul Selkirk
2017-02-20Move dangerous auto_erase functionality to where it's actually used.Paul Selkirk
2017-02-19Remove unnecessary delays in flash code.Paul Selkirk
2017-02-19Simplify spiflash test code slightly, add keystore test code.Paul Selkirk
2017-02-15Add n25q128_erase_bulkPaul Selkirk
2016-11-02Wait for WIP to clear before returning from erase operations too.Rob Austein
Wrong-block-type race condition errors went away after adding the WIP check after flash write operations, then came back once (isolated incident) while running a series of tests which had written enough flash blocks that ks_flash may have finally had to erase something rather than just zeroing. Code inspection confirmed that the erase code was not waiting for WIP to clear before exiting. Difficult to prove that this was the cause of an unreproducible failure, but seems like a likely candidate given previous behavior and change should be harmless, so adding it. Timeout for this flag check is 2000 ms, which is what other erase-related WIP flag checks were already using.
2016-11-01Don't return from flash write calls until WIP flag clears.Rob Austein
Absence of this check created a nasty race condition in sw/libhal/ks_flash.c, which didn't show up until we had test code which attempted to delete a long series of keys in quick succession. I'm not aware of any sane reason why we would ever want to skip this check, so it's unconditional and applies to all of the SPI flash code, not just the keystore flash code.
2016-09-23Use subsectors instead of sectors in keystore.Rob Austein
2016-09-16Revised ks_flash. Compiles, not yet tested.Rob Austein
2016-05-21Add code to test reading, writing and erasing keystore data.Fredrik Thulin
2016-05-20Add code to reset FPGA using FPGA_PROGRAM_B and FPGA_INIT_B.Fredrik Thulin
Also add code to erase FPGA config memory and check status of FPGA_DONE.
2016-05-19Refactor FPGA bitstream upload code.Fredrik Thulin
Move the N25Q128 code to it's own file in order to be able to reuse it for the keystore memory code.