cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4 - SPI unidirectional receive only

jonop
Associate
Posted on June 16, 2015 at 14:25

The original post was too long to process during our migration. Please click on the attachment to read the original post.
1 REPLY 1
jonop
Associate
Posted on June 16, 2015 at 16:59

Okay, some small progress:

The OVR bit most likely comes from the debugging process where the SPI kept receiving data while the CPU was halted at a breakpoint.

I'm starting my transmissions from a timer overflow interrupt. I now disabled the timers during halt at breakpoints by executing DBGMCU_APB1PeriphConfig(DBGMCU_TIM2_STOP, ENABLE);

in the init code. Now I can successfully restart the transmission.

I set the SPI prescaler to 32, and now the CPU is able to actually catch the interrupts.

So most of my problems are fixed.

Only one remaining is that I still only receive 0x00 even though I can definitely say that there is data arriving at the pin.