Severson-Group / AMDC-Firmware

Embedded system code (C and Verilog) which runs the AMDC Hardware
http://docs.amdc.dev/firmware
BSD 3-Clause "New" or "Revised" License
30 stars 5 forks source link

Prevent overrun trips during first 100 time slices #278

Closed npetersen2 closed 2 years ago

npetersen2 commented 2 years ago

Resolves #265

npetersen2 commented 2 years ago

@GnomeTek please test this code in hardware and convince yourself if it solves the issues you were seeing during start-up when logging is enabled.

GnomeTek commented 2 years ago

@npetersen2 10 sys ticks inadequate. Minimum 52*SYS_TICK_USEC required on my system to pass VSI quantum @ boot.

npetersen2 commented 2 years ago

@GnomeTek Thanks for testing this out.

I have a feeling this is due to the help message being displayed at start-up which takes a lot of CPU time. Then, there must be some extra init code running on top of this which triggers the overrun. Not sure.

I updated the ignore period to a conservative 100 time slices (at the 10kHz nominal scheduler rate, 100 * 100us = 10ms, still a short time).

GnomeTek commented 2 years ago

@npetersen2 I am experiencing timeouts at boot with the modified code. I need to do some investigation as to when this occurred - I believe it was when got the AMDS integrated and sensor data coming ack to the AMDC.

It would seem this issue is not closed quite yet!

npetersen2 commented 1 year ago

@GnomeTek interesting.

When you get a chance, can you open up a new ticket describing how to reproduce the time-outs? Thanks!