Page 2 of 2

Re: Read bit stream from a Serial Interface

Posted: Thu May 11, 2017 2:11 pm
by Roberthh
Since you have access to the whole hardware, especially in viper and assembler, you can also access the ADC registers. But you have to deal with the whole control of it. For convenience, all symbolic register names are available in the stm module, and these names match the data sheet. But you can also call the pyb.ADC methods from a viper or native function and carry on from that point on. Check first, if the speed is not already sufficient.

Re: Read bit stream from a Serial Interface

Posted: Fri May 12, 2017 7:15 am
by pythoncoder
The problem I have with bit-banging in assembler is it's too fast for my test gear ;)

Re: Read bit stream from a Serial Interface

Posted: Fri May 12, 2017 7:31 am
by Roberthh
Yes, the I/O bus is slower than the CPU bus. Between a GPIO I/O line's high/low you hav to insert a few nop(), to allow the I/O to settle, and that is pretty much a trial & error game. Two nop() are guaranteed to work, sometimes one nop() is sufficient. If you find in my TFT driver some nop(), you know why.

Re: Read bit stream from a Serial Interface

Posted: Sat May 13, 2017 5:10 am
by pythoncoder
That's useful information. I had wondered why those nops were there.

Re: Read bit stream from a Serial Interface

Posted: Sun Feb 28, 2021 3:40 pm
by feylen
I know this thread is quite old, but I am currently working on a work project using the SSI protocol to read position data for a servo application. I am interested in how it turned out and if it ended up working in the direction the thread shows. Any news to share on the outcome?