Page 1 of 1

Salvo & SIlabs C8051F12x

PostPosted: Wed Jun 30, 2004 4:32 am
by eyalasko
Hello,

How does Salvo handles Silabs' C8051F12x-specific features such :
1. SFR paging
2. Non standard interrupt sources

Thanks

Eyal Lasko
Itamar Medical

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


Re: Salvo & SIlabs C8051F12x

PostPosted: Wed Jun 30, 2004 4:45 am
by aek
Hello.

Neither should be an issue.

It's important to understand that Salvo is extremely hardware-independent. Most issues that affect portability are compiler issues.

Now, it's entirely possible that Salvo tutorial examples might not work on a particular chip, but that usually has nothing to do with Salvo per se -- the tutorials make certain assumptions about the hardware available on the chip, and they may not match the chip you're using. A good example is which interrupt is used to call OSTimer() -- the code to initialize the interrupt source and create the ISR to call OSTimer() will work for the target chip it was created for, but perhaps not for another member of the family. That's up to the user / evaluator to investigate.

About the only hardware-specific stuff Salvo knows is how to control interrupts, the register usage of the compiler, and the instruction set. The only hardware issues I can think of that affect Salvo are code paging and perhaps pipelining, and they tend to be CPU-core-specific, not chip-specific.

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


Re: Salvo & SIlabs C8051F12x

PostPosted: Wed Jun 30, 2004 5:27 am
by eyalasko
Hi,

Thanks for your prompt reply.

The F12x chips have multi[ple SFR pages, so an attempt to use TCON register (required for proper timer operation) from within paged SFR (i.e. in page other then 0) may result corruption of a different SFR that share the same address in a different SFR page (In F12x case it is a comperator register). In this case it is hardware specific issue (not compiler)
I guess that what I'm trying to ask is further explained in a porting guide that I'm trying to locate in this site.

Many thanks.

Eyal


Re: Salvo & SIlabs C8051F12x

PostPosted: Wed Jun 30, 2004 5:34 am
by aek
Hello.

Salvo will not directly access (any) TCON register -- a Salvo application may access it, but Salvo knows (and needs to know) nothing about that TCON register. I.e. no call to any "OS???" service will ever access TCON.

So, in your case, the control of the TCON register is probably within an ISR and also in initialization code, and it's up to the user to handle that properly.

The porting manual would not cover this issue anyway, as it's beyod the scope of Salvo porting issues.

If you can be more specific as to how these paged SFRs are causing a problem for you in a Salvo application, perhaps I can be of more assistance.

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


Re: Salvo & SIlabs C8051F12x

PostPosted: Wed Jun 30, 2004 5:43 am
by aek
As an aside, I'll note that PICs have massively paged SFRs (especially the PIC16s). A few are common across all pages (e.g. STATUS and INTCON), but most (e.g. peripheral config registers) are paged. Therefore when the user want to gurantee acess to the proper (paged) SFR, they need to set the page first before attempting access.

You probably know all this already -- I'm just pointing out that Salvo doesn't interact with such paged SFRs, and so it's up to the user to write the correct code to ensure proper access to paged SFRs.

Another alternative is that the compiler may offer a means of accessing paged SFRs drectly using a pointer, etc. that has embedded in it paging information.

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


Re: Salvo & SIlabs C8051F12x

PostPosted: Wed Jun 30, 2004 9:05 am
by eyalasko
Thanks again for your comprehensive replies.

1. What are the HW specific issues that the OS kernel requires for its operation. ?
(I believe that at leaset OS_Timer porting code should be supplied by the system developer)
2. How does Salvo handles interrupts ? i.e. can it 'hook' a task to an interrupt or generate an event in response to an interrupt (like Keil's RTX51) ?
3. I can not trace the porting guide. Could you refer/email it (elasko@itamar-medical.com).

Many thanks once again..

Eyal

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


Re: Salvo & SIlabs C8051F12x

PostPosted: Wed Jun 30, 2004 9:15 am
by aek
Hello.

I keep coming back to what I think is a misunderstanding here -- there are not / should not be any porting issues for Salvo on any SIlabs parts.

Can you please point me to a specific problem (i.e. an example project with code) that is causing you concern?

Re the questions:

1) There is no "OSTimer() porting code." Just call OSTimer() at the rate you desire (e.g. 100Hz), either from an ISR or even from mainline code (interrupts are not required, but are usually used to call OSTimer()).

2) Salvo is event-driven, so you can call certain (not all) services from an ISR to cause a task to wake up and service an event (e.g. by calling OSSignalBinSem() from the ISR and calling OS_WaitBinSem() in the task).

3) As I mention above, there is (AFAIK) no porting issue here -- the existing Salvo for 8051 distribution should work fine for you (and does work fine for many existing SIlabs C8051xxx parts).

There are a large number of code examples in the Salvo user manual, as well as real code examples in our App Notes and a few recent presentations. None are 8051-centric, but they're applicable nonetheless.

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


Re: Salvo & SIlabs C8051F12x

PostPosted: Thu Jul 01, 2004 2:28 am
by eyalasko
Hi Again,

I think my misunderstanding happened because it slipped out of my mind (its been a while since I've read the manual) that Salvo is a cooperative OS and no scheduler is presented in its kernel -> no timer is needed.

Thanks once again for your patience and diligence.


Re: Salvo & SIlabs C8051F12x

PostPosted: Fri Jul 02, 2004 8:05 am
by aek
You're welcome.

The User Manual is due for an update -- perhaps we should add something to that effect.

Regards,

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