2017-02-06 09:09 AM
Hello,
I'm trying to implement a software that will allow me to send additional one pulse (on the data wire and clock wire). After one pulse I should send data (32 bits) over spi.
Frame should look like:
1 bit + 32 bit
clock pulse every bit
I tried to send 0x80 over SPI and USART but no luck - for 0x80 i have 8 clock pulses. How to implement one clock pulse? PWM? Timers? Dma?
I would be grateful for every idea !
John
#solution-needed #idea-needed2017-02-09 04:59 AM
I had a similar task.
One solution is to switch to 11-bit mode and send three 'words' of 11 bits. Of course with prior bit shifting and splitting of original 32-bit data.
2017-02-09 06:41 AM
,
,
The 3x11 trick may be nice but possible only on newer STM32s which have more flexible setting than the '
SPI which allows only 8 or 16 bit frames.JW
2017-02-09 08:46 AM
I mean 33-bits eight times, a frame of 264 bits total arranged in memory as 33 bytes. You want to clock out 32+1 bits, if you don't need a chip select pulse every 33 bit, array the memory so you can fit the frame into the granularity the hardware offers.