Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - prh

Pages: [1]
1
Webserver Firmware / Boot up hang (Ethernet) and watchdog
« on: July 30, 2014, 09:04:39 AM »
A few topics in one posting.
We have multiple SBC projects based upon circa 2010 netcruzer project code. We are trying to track down some annoying bugs in some of the code branches that manifests in various ways:

1) if the SBC is powered up with an active/ready Ethernet connection already present it will hang completely in the first ~1 second. In this situation power cycling the SBC with Ethernet disconnected, waiting ~5 seconds and then  plugged in the Ethernet cable all is well. (SBC configured for dynamic IP)

2) SBC and a *router* power up at the same time. As router boots after ~20 seconds the SBC is seen at default IP of 192.168.1.54. After a further ~30 seconds the routers DHCP server assigns a dynamic address to the SBC. SBC can then become "lost" all attempts to reach it over IP fail, however it's system led is still flashing indicating main cooperative loop is still active (We flash LED in main cooperative loop, not an interrupt).

Are these know issues with older libraries? Anywhere specific to check for a bug or a work around?

Which brings me to my 3rd question as a short term solution for some of these issues may be to force a reboot on hang:
3) Is there some example code for the hardware watchdog feature? and what is the maximum length of time that can be configured for the watchdog before a board reset (we probably want to use 1-10 seconds) ?

Many thanks.

2
Webserver Firmware / software timer interrupt
« on: July 10, 2014, 05:24:57 AM »
Hi,
I'm using multiple SBC66EC with heavily modified webproject firmware. We now have a requirement for a high speed PID loop (1ms or better cycle time) based on a single analog input and a single PWM output.
I've tried inserting the code in the main loop but the co-operative multitasking of the HTTP and other tasks  make this too slow and to much variation in speed when there is web activity.

I've identified that a software timer interrupt is the way to go for the PID and was using the "ledflash_int/main.c" code as a starting point. Unfortunately timer1 is already used by the Tick.c code for system timer. What other timer may I use in the webproject and is there some example code?

Also what is the quickest way in an interrupt routine to make an ADC read of a particular pin (and how many clock cycles does that take) , and same question or setting a new PWM value for an output pin (cycle count?) - I'd like to get a feel of the latency involved so I can get some correct factors in my PID control.

Many thanks.


Pages: [1]