SPI_Asm bug
Rayman
Posts: 14,646
in Propeller 1
My code works with SPI_Spin but not SPI_Asm…
I'm interfacing a Prop with EVE2 based display module.
It's regular SPI, but with 32 bit packet size.
I found the bug (I'm going to call this a bug) in the assembly code, in the MSBFirst_ section:
LSB first works, but MSB first does not for bits=32
This messed me up pretty good, had to break out oscilloscope to figure out what is going on...
I'm interfacing a Prop with EVE2 based display module.
It's regular SPI, but with 32 bit packet size.
I found the bug (I'm going to call this a bug) in the assembly code, in the MSBFirst_ section:
shl t5, arg3 '' Shift "1" N number of bits to the left.
LSB first works, but MSB first does not for bits=32
This messed me up pretty good, had to break out oscilloscope to figure out what is going on...
Comments
Seems to work for me anyway...
Maybe only 32-bit transfers work...
I think I'll just make a new one that does only what I need...