Hi Seb,
On 2011/04/16 09:39, Sebastien Lelong wrote:
I don't use "asm bank PPSCON", I'm not sure
it's needed as compiler knows where it is. I've also seen this in
rtcc_hw library, I may have miss something...
The compiler will indeed generate the required 'movlb 0x0E', but only
later in the sequence than where it is shown in the sample code in the
datasheet.
About a year ago there was a discussion with Kyle for the RTCC library.
The datasheet for says for RTCC:
For the RTCWREN bit to be set, there
is only one instruction cycle time window allowed
between the 55h/AA sequence and the setting of
RTCWREN.
From which I concluded that it should not be left to the compiler to
put the 'movlb 0x0E' where it likes, but force it on the place which the
datasheet prescribes (it is not a recommendation!).
Even though the datasheet does't talk about a time frame for setting
PPSCON_IOLOCK, it prescribes a specific sequence, which the library
should follow.
Regards, Rob.
--
R. Hamerling, Netherlands --- http://www.robh.nl
--
You received this message because you are subscribed to the Google Groups
"jallib" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/jallib?hl=en.