Pumpkin, Inc.

Pumpkin User Forums

Salvo + MPLAB-C18 v2

For issues specific to Microchip's PICmicro® MCUs, including compilers (e.g. HI-TECH PICC & PICC-18, Microchip MPLAB®-C18) and IDEs (e.g. Microchip MPLAB®).

Re: Salvo + MPLAB-C18 v2

Postby Benoit Braud » Tue Jul 30, 2002 8:02 am

Hi,

I move my call to OSTimer() from a low level interrupt to a high level interrupt : now, it works fine.
Thanks.

I will continu to work with the OStimer() in a high level interrupt. It is not the best configuration for my application, but it works. I notice that if i want to call Salvo services from low interrupt, i need to upgrade to the PRO version.

Is it said in the documentation that only high level interrupt are disable for PIC18 ?

Regards.

Benoit B.
Benoit Braud
 
Posts: 10
Joined: Wed Jul 03, 2002 11:00 pm
Location: Avrillé, France

Re: Salvo + MPLAB-C18 v2

Postby aek » Tue Jul 30, 2002 9:23 am

Hi Benoit.

I'm glad that things are working for you now.

Note that the other OSTimer() method I proposed earlier (where you set a flag in the low-level interrupt and test-and-clear it in the main loop) should also work, and will allow you to use the low-level interrupt for timing.

The GIE/GIEH issue is documented in the Notes in portmcc.h.

We chose to control only GIE/GIEH as the default because otherwise we would have to clear GIE/GIEH and PEIE/GIEL, also, and this would then disable all interrupts. Also, in the PIC16 and PIC17 Salvo libraries we only control GIE, not PEIE. So this was done for consistency.

Would you prefer that we change the default so that all interrupts are disabled and then re-enabled by Salvo? This would allow you to use high- and low-priority (or general and peripheral) interrupts with the standard libraries ... maybe we could even do two sets of libraries ...

With Salvo Pro you can configure the interrupt behavior to suit your needs.

Regards,

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

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

Re: Salvo + MPLAB-C18 v2

Postby Benoit Braud » Wed Jul 31, 2002 12:23 am

Hi,

f it is possible to do 2 sets of libraries (one with diable of all ISR), i will be glad, because for my application, it is better to call some salvo service from low interrupt (OSTimer(), OSSignalSem()).

Please informe me if you will do it or not.

Regards,


[/B][/QUOTE]

Benoit B.
Benoit Braud
 
Posts: 10
Joined: Wed Jul 03, 2002 11:00 pm
Location: Avrillé, France

Re: Salvo + MPLAB-C18 v2

Postby aek » Wed Jul 31, 2002 7:57 am

Hi Benoit.

Yes, I think we can do that. We'll have two variant sets of the MPLAB-C18 libraries:

1 will have only GIE/GIEH disabled. This is for people who do not use the high/low interrupt scheme.

1 will have GIE/GIEH and PEIE/GIEL disabled. This is for people who use the high/low interrupt scheme.

We should be able to release these libraries in a new Salvo for PICmicro distribution next week.

Regards,

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

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

Previous

Return to PICmicro MCUs

Who is online

Users browsing this forum: No registered users and 2 guests

cron