jankae/LibreCAL

LibreCAL Embedded Firmware improvement limit calibration points per file

bvernoux opened this issue · 2 comments

My proposal for LibreCAL Embedded Firmware is to add a limit of 10001 or 5001 calibration points per *.snp file.
That limit shall allow in worst case to create all 4 ports calibration files with enough space in flash (limited to 748KB today).

Actual limitation with default 16Mbits (2MBytes) SPI Flash for calibration:

  • After some internal tests with actual default SPI Flash 16Mbits (2MBytes) with 1MBytes for each partition (LIBRECAL_R & LIBRECAL_RW) we do not have enough space to do a full calibration for the 4 ports with 1601pts and 100 comments per snp file.
    • With my test full 4 ports calibration create 18x snp files which requires a total of 1369626 bytes about 1.3MBytes when there is only 748KB available, so that means we are limited to max 801pts per *.snp file
    • For information with 1601 pts each s1p file size is about 47KB and s2p files are 131KB.

I would rather not restrict the number of points to a specific value. Someone might want more points but e.g. only store coefficients for ports 1 and 2 (in case of a two port VNA). What I would much prefer is using a bigger SPI Flash. The software already supports up to 128Mbits (with the W25Q128JV). Even larger devices could be added in the future but I believe they would require a new layout (using a different package).

Yes let's keep it like that, I have tested that in worst case during creation of the snp file if there is not enough space in SPI Flash that will return an error