Skip to main content
jonop
Associate
June 16, 2015
Question

STM32F4 - SPI unidirectional receive only

  • June 16, 2015
  • 1 reply
  • 619 views
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.
    This topic has been closed for replies.

    1 reply

    jonop
    jonopAuthor
    Associate
    June 16, 2015
    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.