Hi all,
I want to create a 256mS delay using the RTI modulo on a SH08, I don't eant an interrupt so I'll use pollins software solution.
I used the RTI modulo before but never get this error:
Error: At location FFCC -
Error: Attempt to use invalid or uninitialized memory
Error: Interrupt processing failed.
HALTED
The message apperas only when the RTICNT reaches the RTIMOd value and the RTFI flag should be set, If I disable the general interrupts I don't have the error.
Can anybody help me? Thxs in advance.
Hello Cram!
I do not understand C Language cause I write my programs in assembly language.
It seems to me that you dont initialize the Interrupt Vectors.
Try to initialize the interrupt Vector Table from 0xFFFE - 0xFFC0. In assembly language that should look like this:
RTC_ISR:
RTI
Vectorstart: EQU $FFC0
;**************************************************************
;* Interrupt Vectors for MC9S08SH8 *
;**************************************************************
ORG Vectorstart
DC.W spurious ; 31 unuset/future used
DC.W spurious ; 30 Vacamp
DC.W spurious ; 29 unuset/future used
DC.W spurious ; 28 unuset/future used
DC.W spurious ; 27 unuset/future used
DC.W spurious ; 26 Vmtim
DC.W RTC_ISR ; 25 Vrtc
DC.W spurious ; 24 Viic
DC.W spurious ; 23 Vadc
DC.W spurious ; 22 unuset/future used
DC.W spurious ; 21 Vportb
DC.W spurious ; 20 Vporta
DC.W spurious ; 19 unuset/future used
DC.W spurious ; 18 Vscitx
DC.W spurious ; 17 Vscirx
DC.W spurious ; 16 Vscierr
DC.W spurious ; 15 Vspi
DC.W spurious ; 14 Vtpm2ovf
DC.W spurious ; 13 Vtpm2ch1
DC.W spurious ; 12 Vtpm2ch0
DC.W spurious ; 11 Vtpm1ovf
DC.W spurious ; 10 unuset/future used
DC.W spurious ; 9 unuset/future used
DC.W spurious ; 8 unuset/future used
DC.W spurious ; 7 unuset/future used
DC.W spurious ; 6 Vtpm1ch1
DC.W spurious ; 5 Vtpm1ch0
DC.W spurious ; 4 unuset/future used
DC.W spurious ; 3 Vlvd
DC.W spurious ; 2 Virq
DC.W spurious ; 1 SWI
DC.W _Startup ; 0 Reset
Regards,
Ingo