cancel
Showing results for 
Search instead for 
Did you mean: 

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

ABhat.7
Associate III

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.

2 REPLIES 2
TDK
Guru

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.

If you feel a post has answered your question, please click "Accept as Solution".
ABhat.7
Associate III

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.