Pular para o conteúdo principal
Knowledgebase
Home
Renesas Brasil - Knowledgebase

What happens to MCU if the stack pointer is 3Fh and it underflow from 00h?

Latest Updated:03/01/2005

Question:

(CPU)  
(1) If the stack pointer is 3Fh or lower while the stack page is set to the zero page, what happens to the MCU ?
(2) If the stack pointer underflows from 00h when the stack page is set to the 1st page, what happens to the MCU ? [2005/03/01]

Answer:

(1) Even if the stack pointer is 3Fh or lower while the stack page is set to the zero page, operation will continue using the SFR area in the zero page as the stack, and the MCU may malfunction.

(2) If an underflow occurs from 00h, when the stack page is set to the 1st page, the stack pointer becomes FFh and specifies address 1FFh.
If the RAM is assigned to address 1FFh, operations are continued;
however, correct operation cannot be guaranteed since the MCU does not expect the stack pointer to underflow.
In addition, emulators and simulators, etc. will not operate properly under these conditions.
(#104739)

Suitable Products
3803H
3803L
3823
3850A
3858
38D2
38D5
7544
7545
7546
7547
7548
7549