This question is similar to SPI - Apparently Random pulses on CS/SS line in that I have a single SPI peripheral (a Microchip 23LC512 Serial SRAM) that an Arduino UNO is communicating to.
Everything is set up correctly, and indeed, the chip works. I can write to and read from it without issue (example write function).
void writeSRAM(uint16_t address, uint8_t data) {
digitalWrite(SS, LOW); // Select chip
uint8_t addr_h = (address & 0xff00) >> 8;
uint8_t addr_l = (address & 0xff);
uint8_t xfer[] = {WRITE_CMD, addr_h, addr_l, data};
SPI.transfer(xfer, sizeof(xfer));
digitalWrite(SS, HIGH); // Deselect
}
Yet, while SPI.transfer
is occurring the CS line is occasionally popping up. This doesn't bother the chip apparently as the short blip of 40ns seems to be tolerated, yet it interferes with the logic analyzer decoders (one of which is custom).
My question is whether or not I should "protect" the CS line with (a pull-up or pull-down resistor of 10K appears to make no difference) to eliminate this noise (which I assume is not a bug in the Arduino SPI library as I see no reason a spurious raise CS would be there).