‎2022-04-16 10:45 PM
Hello
I'm working with spc560p and I want to enable serial receiv​e interrupt, that whenever data received, it save the data and so on.
I could send data by serial driver as sd_dll_write command and its ok. But when I want to use sd_dll_read, actually mcu stopped. It is cleared that I should use interrupt. But need some help.
Thanks​
Solved! Go to Solution.
‎2022-05-16 11:54 PM
Hello,
happy that it works now.
You must set sync to 0 before each time you call sd_lld_read:
if (sync == 1) {
sync = 0;
sd_lld_read(...);
}
Would you please put a best answer if you are happy of my support.
Best Regards,
-Olivier
‎2022-05-16 11:54 PM
Thank you for your answer.
‎2022-05-17 01:51 AM
Thanks for your answering. My problem is solved now.
Thank you :folded_hands:​
‎2022-05-17 01:53 AM
Great :ok_hand:
Have a nice day
‎2022-10-30 06:35 AM
Hello
In other projects, I worte below codes but interrupt don't work correctly. It just send 0xAA but it don't recognize any messages.
​
int sync =0;
​void myRXCB(SerialDriver *sdp){
(void​)sdp;
sync = 1;
}
​
for(;;){
sd_lld_write(0xAA);
if(sync ==1){
sync=0;
sd_lld_read(Buffer);
}​
}​
​
And when I write below codes, it recognize messages but it just send 0xAA when receive was complete.
​
​for(;;){
sd_lld_write(0xAA);
sd_lld_read(Buffer);
}
Would you please help me out with this method that MCU send 0xAA and recognize massages ​by uart interrupt.
Thanks ​
​