CodeWarrior 5.1 debugger. "Disable maskable ISR's when stepping" I-bit permanently set on 9S12XEQ512

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

CodeWarrior 5.1 debugger. "Disable maskable ISR's when stepping" I-bit permanently set on 9S12XEQ512

42 Views
Eric_t
Contributor III

Environment:

  • IDE: CodeWarrior 5.1 (HC(S)12X compiler)
  • Target: MC9S12XEQ512
  • Bus clock: 49.777 MHz
  • BDM interface: reproducible with USB Multilink Universal; not observed with Cyclone Pro
  • Host OS: observed on both Windows 10 and Windows 11
  • Memory model: reproducible in Large model; not (or much less) reproducible in Banked model

Setting used:
"HC12MultilinkCyclonePro" → "Setup..." → "Debug otions " → "Disable maskable ISR's when stepping" — enabled.

Description:
After a number of step operations (single step or step over) in the debugger, the maskable interrupts (I bit in CCR) become permanently disabled. Interrupts do not resume even after continuing execution (Run/Go) — they remain masked until the I bit is manually cleared in the CCR register view. This behavior is consistently reproducible in the Large memory model using the USB Multilink Universal BDM interface, on both Windows 10 and Windows 11 hosts. The issue has not been observed with the Cyclone Pro interface under otherwise identical project settings, nor (or much less) in the Banked memory model

Workaround currently in use:
Manually clearing the I bit in the CCR register view after it becomes stuck.

Request:
Is this a known issue with the USB Multilink Universal firmware/driver in combination with CodeWarrior 5.1's stepping emulation on the S12X core? Is there a fixed Multilink Universal firmware version, or a recommended alternative workflow for debugging interrupt-driven Large-model projects on this device/interface combination?

Thank you

0 Kudos
Reply
1 Reply

7 Views
lama
NXP TechSupport
NXP TechSupport

Hi,

The behavior you are seeing is real and the interface difference you noticed (Multilink Universal affected, Cyclone Pro not) is a useful observation. Let me give you some practical guidance based on the type of interrupts involved, because the options differ.

For timer-based interrupts

If your application uses timer overflow, output compare, or similar peripheral-generated interrupts, you do not actually need the "Disable maskable ISR's when stepping" feature to handle them during debugging. Most S12X timer and peripheral modules have a FRZ bit that freezes the module when the device enters BDM active mode, which happens automatically during any halt or single step. With FRZ set, the timer stops counting during stepping and cannot generate an interrupt between steps. This works at the hardware level, independent of the debugger interface, and is the cleaner solution for this class of interrupt.

For external interrupts and keyboard interrupts (KBI)

This is where the situation is more limited. External IRQ and KBI interrupts are asynchronous external signals and there is no hardware freeze mechanism for them. The BDM interface cannot suppress them at the hardware level. The "Disable maskable ISR's when stepping" feature exists precisely to cover this gap by masking them through the CCR I bit during each step.

Since this feature is not restoring the I bit correctly with the USB Multilink Universal in your setup, the most reliable option for debugging code that uses these interrupt sources is to use the Cyclone Pro, which you have already confirmed behaves correctly.

Worth trying

It is also worth testing with CodeWarrior 5.2 if you have access to it. There were some debugger-side changes in that version and the I-bit restoration behavior under the Large memory model with the USB Multilink Universal may be improved, though this cannot be guaranteed.

Hope this helps clarify the options.

Ladislav

0 Kudos
Reply