From 097c32bf1097bf92099b87bad94ace44c446111a Mon Sep 17 00:00:00 2001 From: Kelvin Lawson Date: Tue, 2 Mar 2010 01:05:14 +0000 Subject: [PATCH] STM8 port: Add details on stack-compatible mode described in the STM8 CPU programming manual. --- ports/stm8/README | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/ports/stm8/README b/ports/stm8/README index da780d4..89375ce 100644 --- a/ports/stm8/README +++ b/ports/stm8/README @@ -387,3 +387,26 @@ or by editing the linker .LKF file as can be seen in atomthreads.lkf. --------------------------------------------------------------------------- +INTERRUPT HANDLING + +Interrupt handlers use the stack of the thread which was running when the +interrupt occurred. If no thread rescheduling occurs during the ISR then +on exit from the ISR any data stacked by the ISR on the thread's stack is +popped off the stack and execution of the thread resumes. If a reschedule +during the ISR causes a context switch to a new thread, then the ISR's +data will remain on the thread's stack until the thread is scheduled back +in. + +Note that the STM8 programming manual currently describes the following +feature: + + "Fast interrupt handling through alternate register files (up to 4 + contexts) with standard stack compatible mode (for real time OS + kernels)" + +This feature was implemented by ST in the core but has to date never been +included in any STM8 products. If it is included in future products then +you will need to put the device in the stack compatible mode described. + + +---------------------------------------------------------------------------