I have implemented injector control firmware by using MC33816 with S32K144 MCU successfully i.e. that controls Source HS and Drain LS as expected.
Some questions about uc0ch1 high-side HS1 automatic interrupt came up while running mc33816 normal operation with the configuration registers setup as follows;
driver_config 0x1C5 = 0x0000
fbk_sens_uc0_ch1 0x180 = 0x0003
out_acc_uc0_ch1 0x184 = 0x0001
out_acc_uc0_ch1 0x188 = 0x0001
During the normal operation (e.g. the Source HS1 is not shorted to GND), IRQB keeps switching high and low and some status registers keep changing as follows;
interrupt_register 0x1D4 = 0x0011 then 0x0000 repeatedly as IRQB switching
err_uc0ch1_part1 0x162 = 0xB4D3 then 0x0000 repeatedly as IRQB switching
err_uc0ch1_part2 0x163 = 0x02A2 then 0x0000 repeatedly as IRQB switching
And interrupt status registers
status_reg_uc0 ox105 has 0x0000,
and
uc0_irq_status 0x10F has 0x240B (This register keeps the value during the normal operation that indicates irq in progress for 'serving auto diagnosis interrupt request').
My questions here,
1. Why does error register have errors even though not configured?
a. err_uc0ch1_part1 0x162 has 0xB4D3 indicating errors on LS1/HS5/HS4/HS3/HS2 occurring even though registers 0x180/0x184/0x188 configured only for HS1
- bit15: Vsds LS1
- bit13: Vsrc HS5
- bit12: Vds HS5
- bit10: Vsrc HS4
- bit7: Vsrc HS3
- bit5: Vds HS3
- bit4: Vsrc HS2
- bit1: Vsrc HS1
- bit0: Vds HS1
b. Same to err_uc0ch1_part2 0x163 has 0x02A2 indicating errors on LS6/LS5/LS4/LS2 even though registers 0x180/0x184/0x188 configured only for HS1
2. How can I fix the error register incorrect error indication if something wrong?
3. The uc0_irq_status 0x10F is affected by error register 0x162/0x163?
For your better understanding, my register configuration for CH1 is attached.
Dear Chang,
please refer to the section 10.4 in the MC33816 datasheet.
Please disable the Automatic diagnosis.
If extra support is required we are working with a subcontractor company called Ideas and Motion who can do the microcode for them at a cost of course. They can contact them if need a quote: Contact alberto.manzone@ideasandmotion.com
With Best Regards,
Jozef
Dear Jozef,
Thank you for your follow-up.
Thing is that automatic interrupt is needed for error diagnosis but problem is that unconfigured (other) errors are up in error register 0x162/0x163. The valid errors, I think, should be configured by using registers 0x180/0x184/0x188.
The answer you provided for this issue is not proper to fix my problem because
1. the instruction endiaga enables to call irq service routine that I have to have for the automatic interrupt operation.
2. the issue I posted is not related to the instruction endiaga, and I verified that sometimes the problem occurs and sometimes it does not occur while the endiaga being ON (diagon).
Therefore, I think this issue is a configuration register related.
Do I need to work with the subcontractor company "Ideas and Motion" for issues about register configuration?
Thank you.