Only receiving FF out of the M95M04
- July 20, 2026
- 1 reply
- 9 views
Hello,
I am trying to use the M95M04 as a SPI slave device from the ADI DS28E18 one-wire bridge. A picture has been uploaded to show the entire hardware setup. My main issue is that whenever I try to send data to the EEprom and then read that data back, I only get FF as a result. When setting write enable or write disable, the MISO line pulls low like would be expected and returns 00. I have used an oscilloscope with a bus decoder to ensure that the correct commands are being sent out of the DS28E18 to the M95M04, and they are. We never see the WIP bit go high, and we have tried many changes in both the hardware and the software. Our current hardware setup is based off of the schematic image I have posted, but there have been some modifications. C1001 has been changed to 10uF X7R, C1002 has been changed to 1uF X7R, and 10k pull-up resistors have been added on the S# and D pins. From the software side, I have attached the code that our software engineer is using. I have tried replacing the EEprom, I have confirmed that the layout on our board is correct, and I have ensured the traces between the DS28E18 and M95M04 are all intact. If someone could please look through our setup and see if there are any obvious flaws that would be fantastic.
The driver that we are using is linked here: github.com/DRNadler/1Wire.git

static int do_jedec_id(void)
{
uint8_t seq[64];
uint8_t rx[16];
size_t i = 0;
unsigned short seq_addr;
uint8_t status;
if (init_ds28(1) != 0)
return 1;
if (ds28_prepare_spi() != 0)
return 1;
printf("STEP 1: Initial status\n");
if (read_eeprom_status_byte(&status) != 0)
return 1;
printf("Status = 0x%02X\n", status);
printf("STEP 2: WREN\n");
if (write_enable_only() != 0)
return 1;
if (read_eeprom_status_byte(&status) != 0)
return 1;
printf("Status after WREN = 0x%02X\n", status);
printf("STEP 3: RDID\n");
seq[i++] = DS28_SPI_SS_LOW;
seq[i++] = DS28_SPI_WR_RD_BYTE;
seq[i++] = 4U; /* write length */
seq[i++] = 16U; /* read length */
seq[i++] = M95_CMD_RDID; /* 0x83 */
seq[i++] = 0x00;
seq[i++] = 0x00;
seq[i++] = 0x00;
/*
* Save where read data begins.
* For WR_RD_BYTE the returned bytes overwrite
* the dummy bytes in sequencer memory.
*/
seq_addr = (unsigned short)i;
for (int j = 0; j < 16; j++)
{
seq[i++] = 0xFF;
}
seq[i++] = DS28_SPI_SS_HIGH;
dump_bytes_limited("RDID SEQ",
seq,
i,
64);
if (!DS28E18_WriteSequencer(0U, seq, (int)i))
{
fprintf(stderr,
"DS28E18_WriteSequencer failed\n");
return 1;
}
if (!DS28E18_RunSequencer(0U, (unsigned short)i))
{
fprintf(stderr,
"DS28E18_RunSequencer failed\n");
return 1;
}
memset(rx, 0, sizeof(rx));
if (!DS28E18_ReadSequencer(seq_addr,
rx,
sizeof(rx)))
{
fprintf(stderr,
"DS28E18_ReadSequencer failed\n");
return 1;
}
dump_bytes_limited("RDID RX",
rx,
sizeof(rx),
64);
if (read_eeprom_status_byte(&status) != 0)
return 1;
printf("Status after RDID = 0x%02X\n", status);
printf("WIP=%u WEL=%u\n",
(status & M95_STATUS_WIP_MASK) ? 1U : 0U,
(status & M95_STATUS_WEL_MASK) ? 1U : 0U);
return 0;
}This code is an example of something that we have that only returns FF from the M95M04
