Any ideas how I can debug onewire library?
I think my wiring is ok, however ow.search() is not returning anything.
Would the onewire lib be using timer functions that might not be implemented properly yet?
I added this to get around an error, but have not got any futher:
mode = GPIO_MODE_OUTPUT_OD;
There is a delay here:
Personally I'd say you probably want to put a logic analyser on it and compare with a board that does it properly.
The OneWire library itself should be pretty good now (i mean, it's worked fine on pretty much every architecture) and the only external things it uses are:
You found the first two, so if they work fine then about the only thing it could be is IRQs jumping in and causing problems.
Of course if it's like the ESP8266 then it actually 'caches' flash data in RAM and executes from that. If the OneWire + GPIO + delay code isn't in the correct section, it may end up having to be loaded on demand, which would mess up the timings.
Ok. Maybe time to justify/invest in a logic analyser! Any recommendations? (cheap)
Using a poorman's Led on the signal line, I can see it glowing dimly.
The disable/enable interrupts are just stubs at the moment, as the espruino was pinned to a core I was wondering if that was not important - but probably is!
Time to read the sparse documentation again!
I tried a few things to disable interupts but no cigar at this point
Don't worry about formatting, just type in the text and we'll take care of making sense of it. We will auto-convert links, and if you put asterisks around words we will make them bold.
For a full reference visit the Markdown syntax.
© Espruino, powered by microcosm.
Report a problem