orgua / OneWireHub

OneWire slave device emulator
GNU General Public License v3.0
343 stars 86 forks source link

DS2431 Overdrive Master unable to read, Teensy LC #88

Closed Rotario closed 4 years ago

Rotario commented 4 years ago

Hi oruga, First - fantastic library I'm sure you've helped countless people with this lib. I don't know if this is the best place to put this but I've got an issue with a DS2431 slave chip, where I've got a proprietary master - one that only tells me if the chip is right or not - a working DS2431 chip and a Teensy LC running onewirehub, emulating the same DS2431.

As far as I can tell, the master reads the whole dataset in 8 byte lines in overdrive mode.

Using a (cheap) logic analyser I see the following byte (after a reset/presence pulse, overdrive match command and then the DS2431's address, then 0xF0 (read data), 0x00, 0x00 (data address) DS2431: image

Teensy: image

Teensy first half section: image Teensy second section: image

As you can see, the analyser reads 0x43 in both data streams, but the teensy data is split over two "sections" (time slots?) What could be causing this weird behaviour?

Thanks in advance

In my program: Note: disabled all serial for overdrive mode, just creating a char array for the whole dataset and calling. My value_ipl is 6 ds2431.writeMemory(reinterpret_cast<const uint8_t *>(dData),sizeof(dData),0x00);

Rotario commented 4 years ago

Scratch that! Changed value_ipl to 10 and it works!