Hello,
I am trying to use the LCU peripheral on a S32k312 MCU.
I am using Matlab R2022a, EB Tresos version 29.0.0, NXP MBDToolbox S32k3xx version 1.4.0 and NXP support package S32k3xx version 1.4.0.
I am currently working on an evaluation board (S32k312EVB-Q172) with a slightly modified version of a DIO example provided with the Matlab toolbox (s32k3xx_dio_ebt). The Simulink model has not been modified, but the EB Tresos configuration has to achieve the following function:
Use PTA19 as input -> Route to LCU_0 LCO through TRGMUX IN 13 -> invert the input to output 0 -> route to PTB21 through TRGMUX out 12.
The problem I have is that the MCU ends up in a hard fault handler during initialization of the LCU (see stack trace in attachment when I try to debug the Matlab generated code using S32DS).
Can anyone point out what I am missing to use the LCU peripheral? I am assuming my configuration is either wrong, or there is something that I am forgetting to configure, but I can't find the problem.
I have attached the whole Matlab folder.
Thank you for your help,
Alex Cloutier