Pumpkin, Inc.

Pumpkin User Forums

Salvo as a board bringup debugger

If you want to share a clever way of using Salvo in your embedded application, post it here.

Salvo as a board bringup debugger

Postby kenward1000 » Wed Jun 18, 2008 4:00 am

One technique that has worked well for me during board bring up with Salvo, is to create a low priority task to blink an LED. I use OSDelay(500msec) between turning the LED on and off.

In practical terms, any time the LED is always on or off, there is a serious problem. If the LED is blinking, then Salvo is at least running, and therefore usually the rest of the code as well. A blinking blue LED is very soothing.

Example: my UART was getting flooded with noise on the RX line. The LED was not blinking, so this was a clue that the PIC was so busy doing something (in this case spending all it's time looping through the ISR) that Salvo was getting no OSTicks.

Example: I was having conflicts with multiple devices on the SPI bus, and the PIC was stuck in a 2 instruction loop waiting for the BF flag (which was never going to be set). The LED was always on, alerting me that something was seriously wrong.

I've been using Salvo on PIC 18's for almost a year now, and it works great. I have very limited memory resources but I wanted a product with source access and strong technical support. Salvo is the clear winner for my products.

Ken

kenward1000
 
Posts: 1
Joined: Sun Jul 29, 2007 11:00 pm
Location: San Jose, CA, USA

Re: Salvo as a board bringup debugger

Postby aek » Wed Jun 18, 2008 4:12 am

Thanks, Ken!

A blinking LED that runs as a low-priority task is a great way to see at-a-glance that things are working properly.

------------------

-------
aek
aek
 
Posts: 1887
Joined: Sat Aug 26, 2000 11:00 pm

Re: Salvo as a board bringup debugger

Postby aek » Wed Jun 18, 2008 10:01 am

Another thing I have found to be useful is to do the following in the idling hook:
code:
set IO low;
sleep;
set IO high;

This gives a high pulse that is indicative of how much the system is loaded. A short pulse indicates that that the system is asleep the majority of the time (as it should be in an event-driven system). As the pulse grows in length, the system is spending more time multitasking. And if it goes dc, the system is running tasks all the time with no headroom left (or you've accidentally failed to yield out of a task).

------------------

-------
aek
aek
 
Posts: 1887
Joined: Sat Aug 26, 2000 11:00 pm


Return to Hints & Ideas

Who is online

Users browsing this forum: No registered users and 1 guest

cron