Error: Unexpected realtime delay on task 0 + Watchdog has bit!

More
16 Jun 2024 09:37 #303098 by Hossein74Majidi
Hi guys
I have Orange Pi 5 plus and I've connected it to my Spartan 6 FPGA dev board via SPI.
I used hm2_spi component.
After running some tests I could get 1 MHz output from stepgen.
But every time that I run the LinuxCNC I get this error:
"Unexpected realtime delay on task 0 with period 1000000. This message will only display once per session. Run the latency test and resolve before continuing."
Another error which completely stop the motor is about watchdog:
"hm2/hm2_7i90.0: Watchdog has bit! (set the .has-bit pin to false to resume)"
How can I solve these errors? 
I've read the related posts in forum about these but I couldn't figure it out.

P.S:
The result of latency test after an hour: 14.7 us
The result of command "uname -a":
Linux orangepi5-plus 5.10.160-rt89+ #8 SMP PREEMPT_RT Sun Apr 14 23:02:59 CST 2024 aarch64 GNU/Linux
The exact error is attached
The ini and hal files are attached too.
Attachments:

Please Log in or Create an account to join the conversation.

More
16 Jun 2024 13:03 #303106 by PCW
It may be that the Orange Pi SPI driver is not capable of real time operation.

Printing the tmax values for all functions may help diagnosis:

halcmd show param *.tmax

(these times will be in ns on the Orange Pi)
The following user(s) said Thank You: Hossein74Majidi

Please Log in or Create an account to join the conversation.

More
18 Jun 2024 05:21 - 18 Jun 2024 05:23 #303226 by Hossein74Majidi
opi5p@orangepi5-plus:~$ halcmd show param *.tmax
Parameters:
Owner Type  Dir Value     Name
36 s32  RW  965109          hm2_7i90.0.read.tmax
36 s32  RW  3890184        hm2_7i90.0.write.tmax
29 s32  RW  1459              motion-command-handler.tmax
29 s32  RW  11958            motion-controller.tmax
39 s32  RW  584                pid.s.do-pid-calcs.tmax
39 s32  RW  1458              pid.x.do-pid-calcs.tmax
39 s32  RW  583                pid.y.do-pid-calcs.tmax
39 s32  RW  583                pid.z.do-pid-calcs.tmax
30 s32  RW  4029890        servo-thread.tmax

This is the result of "halcmd show param *.tmax" command. is it mean that my spi doesn't support realtime? or I can make it better by manipulating the os kernel?
Last edit: 18 Jun 2024 05:23 by Hossein74Majidi.

Please Log in or Create an account to join the conversation.

More
29 Jun 2024 11:15 #304016 by Hossein74Majidi
Hey guys
I still have problem. With lots of searching and trying out and talking with some of friends, I think it might be the SPI that have the realtime issue not the os kernel. Please help me to get through this.
I'm still getting these 2 errors:
"Unexpected realtime delay on task 0 with period 1000000. This message will only display once per session. Run the latency test and resolve before continuing."
"hm2/hm2_7i90.0: Watchdog has bit! (set the .has-bit pin to false to resume)"
The watchdog error doesnt show up in a regular timing. but  in every session it will definitely happen.
 

Please Log in or Create an account to join the conversation.

More
29 Jun 2024 13:32 #304018 by PCW
36 s32  RW  3890184        hm2_7i90.0.write.tmax

Means the SPI write to the FPGA took almost 4 ms.
As I mentioned before, this likely means that the
Orange PI's kernel SPI driver is not capable of
real time operation.
The following user(s) said Thank You: Hossein74Majidi

Please Log in or Create an account to join the conversation.

More
29 Jun 2024 17:25 #304036 by Hossein74Majidi
So what do you suggest?
I need to use another spi low-level driver?

Please Log in or Create an account to join the conversation.

Time to create page: 0.133 seconds
Powered by Kunena Forum