Dear Jozef,
I appreciated your clarification.
My work for MC33816 mostly refers
1. sample_code generated by MC33816 Developer Studio IDE.
2. MicroCode provided with AN4954 MC33816 Diagnostics doc.
According to ProcessAutomaticInterrupts() in MC33816_irq.c of the sample_code, it reads ch1_status_reg_uc0 (the status register at 0x105) and check bit0 if INJ1 fails and check bit1 if INJ2 fails as follows;
void ProcessAutomaticInterrupts()
{
auto_irq = send_single_SPI_Cmd(READ, main_Interrupt_register, 0x00) & 0x000F; // Since this register is latched on first IRQ need to check if other occurred
...
status = send_single_SPI_Cmd(READ, ch1_status_reg_uc0, 0x00); // Read Status register 105h uc0ch1 to check which injector failed
if ((status & 0x1) == 1) // INJ1 fails b0 at 1
{...}
if ((status & 0x2) == 2) // INJ2 fails b0 at 1
{...}
...
}
And according to Microcode ch1.psc (CH7.1 Injection Banks Management Source Code, page 29) in the AN4954 MC33816 Diagnostics doc, it sets bit5 of the status register with "stsrb" (Set status register bit) instruction.
irq_auto: stos off off off; * Disable drivers
endiaga diagoff; * Disable automatic diagnostic
stirq low; * Set the low IRQB pin
stf high BstFlag; * Set flag0 high DCDC active
stsrb high AutoIrqBit; * Set status register bit 5 when automatic diagnosis interrupt trig
A fault test condition that I got is
1. to make Source HS1 (it might be INJ1 that I assumed) shorted to GND as described at 5.1.2 (page of AN4954 MC33816 Diagnostics doc.
2, the fault successfully generates IRQB low (automatic interrupt occurs) and my application (firmware) calls ProcessAutomaticInterrupts function.
3. I checked that auto_irq = 1 when ProcessAutomaticInterrupts() called by the fault, but the "status" read status register (0x105) is 0 that I think I need to set in the MicroCode.
My understanding from the technical info resources (the sample_code and the doc.) is that I might need to set the status register in MicroCode in MC33816, and so that can be read from appliction code of MCU.
One more thing I would like to provide you for the reference is about Status_reg_uc0 registers configuration (on page 4 of the AN4954 doc) as attached file (file name: status_reg_uc0_0x105.jpg)
Please help me how to get the status = 1 when the fault occurs.
For your information, attached you will get.
1. autoInt_1.jpg file for the fault condition.
2. ProcessAutomaticInterrupt.jpg for the ProcessAutomaticInterrupts().
3. microcode_irq_auto.jpg for the original microcode in the AN4954 doc.
4. status_reg_uc0_0x105.jpg for Status_reg_uc0 registers configuration.
Thank you and best regards,
Chang.