PPS Library remark

Beta Testing discussion on mikroPascal PRO for dsPIC30/33 and PIC24.
Post Reply
Author
Message
Dany
Posts: 3854
Joined: 18 Jun 2008 11:43
Location: Nieuwpoort, Belgium
Contact:

PPS Library remark

#1 Post by Dany » 30 May 2011 10:49

Hi, I noticed that the routine "PPS_Mapping" also calls "Unlock_IOLOCK" before the actual mapping is done, and "Lock_IOLOCK" after the actual mapping is done.

I have 3 remarks regarding that:

- This is not mentioned in the helpfile
- The lock/unlock routines are a little bit unnecessary made public seen above.
- by letting the unlock/lock routines called from the pps_mapping routine, the user can not choose to set the "IOL1Way" configuration bit in config word 2: the OSCCON <IOLOCK> bit must be capable of changing multiple times (unless there is only one call to "pps_mapping").

So, not calling the unlock/lock routines from "pps_mapping" would make things more flexible: the use can do several PPS_mappings and then call once "Lock_IoLock" to lock all IO effectively (this is how things are described in the MicroChip documentation).
Of course, the compatibility with the past would be broken (unless an additional pps_mapping_... routine would be created that does not lock/unlock activities...)

Thanks in advance! :D
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)

User avatar
slavisa.zlatanovic
mikroElektronika team
Posts: 1321
Joined: 07 Apr 2009 09:39

Re: PPS Library remark

#2 Post by slavisa.zlatanovic » 31 May 2011 12:23

Hi Dany!

The similar issue has been discussed here:
http://www.mikroe.com/forum/viewtopic.p ... 30#p141430
I agree with your remarks. We'll take them in consideration.
Thanks!
Best regards
Slavisa

Post Reply

Return to “mikroPascal PRO for dsPIC30/33 and PIC24 Beta Testing”