Skip to main content
Visitor II
August 10, 2021
Question

LL Driver based Spi not working in stm32f303k8t6 using stm32cubelibrary version 1.1.3

  • August 10, 2021
  • 2 replies
  • 1193 views

hi,

i am trying to run mcp2515 with stm32f303k8 board i am successfully done with Hal but when trying the same function in LL it data register is get some garbage value all time.

attached is my code nd logic analyzer image

I have make sure that transmit part in full duplex working is ok but i am getting garbage in the receive part the in debug i notice that he data register is getting some garbage value,please suggest what could i have done wrong.

    This topic has been closed for replies.

    2 replies

    Super User
    August 10, 2021

    The signals you're showing look perfectly valid. Pretend we don't know what values you're expecting. What values are you getting and how do those differ from your expectations?

    You also need to ensure the receive buffer is clear prior to sending a byte which you want to read. Otherwise you're going to read stale data.

    ABhat.7Author
    Visitor II
    August 12, 2021

    hi,

    i want to know one thing in the debug i found that pi data register is initiations with 0xffff but in the datasheet it showing 0x000 whereas in hal it is 0 why this is happening any idea.