Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • in reply to: Flash chip reports capacity at half size #16466
    jhrg
    Participant

    So I did various things and found two solutions to this problem.
    #1 I modified SPI.cc in void SPIClass::config(SPISettings settings) so it used the behavior from version 1.8.10 of the Arduino core code. That worked, but it’s an ugly hack. Specifically I changed _p_sercom->initSPIClock(getDataMode(settings), clock_freq); to _p_sercom->initSPIClock(getDataMode(settings), settings.getClockFreq());
    #2 I modified my code (after backing #1 out of SPI.cc) so that I call SPI.setClockDivider(SPI_CLOCK_DIV64); after bool status = SerialFlash.begin(SPI, FLASH_CS);

    Since #2 works, I’ll go with that.
    NB: I tried other values for SPI_CLOCK_DIV64 and down to SPI_CLOCK_DIV2 they fixed the problem. I went with the slower speed because my needs are pretty paltry – 13 bytes/hour.

    Can anyone point me toward a good resource on the Arduino SPI bus code. I’m also using LoRa and SdFat and it seems the SPI bus is a source of (ahem) contention.

    Thanks.

    in reply to: Flash chip reports capacity at half size #16464
    jhrg
    Participant

    The chip number/markings are:
    Winbond
    25Q16JVSIQ
    1931

    Thanks

    in reply to: Flash chip reports capacity at half size #16461
    jhrg
    Participant

    Yes, I do have version 1.8.11 of the SAMD Arduino Core. I’m not sure how to roll back to 1.8.10 on/with platformio.

    in reply to: Flash chip reports capacity at half size #16460
    jhrg
    Participant

    I’ll check when I’m at that machine, but I’m using platformio at it’s latest version, so it may well be the problem. If so, will this limit the memory available or just the reported value of capaity?

Viewing 4 posts - 1 through 4 (of 4 total)