Routing signals to emios from trgmux using s32 Design Studio

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

Routing signals to emios from trgmux using s32 Design Studio

Jump to solution
428 Views
RChatterjee
Contributor III

I am generating a PWM in  and connecting it to another through TRGMUX in an S32K358 with RTD 4.0.0, but the other emios channel doesnt duplicate the signal.

In another post I saw it being mentioned the emios inputmux not being set automatically, so I have enabled that too using a modified function for changing corresponding IMCR state. But the EMIOS channel still doesnt take any input.

Interrupts and Notifications are enabled for both channels.

PFA the design file

Tags (3)
0 Kudos
1 Solution
318 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Sorry, I didn't read carefully the discussion of Routing signals to EMIOS channel from Trgmux (S32k3) you mentioned before, so I didn't understand the problem you encountered.
After your prompt, I checked your project again and made the following modifications:
Your project configures channels other than eMIOS0_CH3\CH7 as Emios_Pwm. Since (signal output of eMIOS) eMIOS_n_ipp_do_emios_ch[ ] is not the output of TRGMUX. 

Your project configure eMIOS0_CH7 as eMIOS_Icu, so I chose eMIOS0_CH7 for demonstration. TRGMUX_IP_INPUT_LCU0_LC0_OUT_I1 -> TRGMUX_IP_OUTPUT_EMIOS0_CH5_9_IPP_IND_CH7

// Siul2_Port_Ip_SetTrgMUXInput(564,PORT_INPUT_MUX_ALT3);
Siul2_Port_Ip_SetInputBuffer(NULL, 0, FALSE, 567-512, PORT_INPUT_MUX_ALT4);//eMIOS0_CH7  IMCR567 to 0x4 (TRGMUX_INT_OUT38)

S32K358_Input Muxing eMIOS_0_CH[7]_G SIUL_IMCR567 TRGMUX_INT_OUT38.png

Now, eMIOS will get signals from internal rather than external pins.  That is what you mentioned: My input to EMIOS is LCU_OUT.

View solution in original post

0 Kudos
7 Replies
381 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi

Sorry, I may not understand your question. Please correct me if I understand wrong.
While you connect the external PWM signal to eMIOS0_CH7, do you also want to connect the signal to eMIOS0_CH3 through the internal TRGMUX or LCU?
Through the project you attached, I saw:
You configure eMIOS0_CH3 to SAIC ICU_FALLING_EDGE and ICU_MODE_SIGNAL_EDGE_DETECT. Then call Emios_Icu_Ip_GetDutyCycleValues(INSTANCE_0, CHANNEL_7, &get_dc) in the Notification of eMIOS0_CH3, which is Driver_Fault;

But why not call Emios_Icu_Ip_GetDutyCycleValues(INSTANCE_0, CHANNEL_7, &get_dc); directly in the interrupt of eMIOS0_CH7?

Please see if the method of calling Emios_Icu_Ip_GetDutyCycleValues in S32K344_Example_Emios_Icu_IPWM_measurement_DS34_RTD_100_v2 with EMIOS_1_ch_1 (IPWM mode) meets your needs:

Emios_Icu_Ip_GetDutyCycleValues Icu interrupt.pngIcuIsrEnable EMIOS_1_CH_1 S32K344_Example_Emios_Icu_IPWM_measurement_DS34_RTD_100_v2.png

 

Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
377 Views
RChatterjee
Contributor III

Hi Robin,

"While you connect the external PWM signal to eMIOS0_CH7, do you also want to connect the signal to eMIOS0_CH3 through the internal TRGMUX or LCU?" -- Yes, that is the intention.

The given code is a dummy I made to demonstrate the issue I was having, it is close to but not the actual logic I am implementing. In this code, the LCU is the middleman just to demonstrate that the problem is arising when an emios channel is the trgmux output and is fine when emios is the trgmux input. The problem I am having here is to route an signal to the emios through trgmux. I have referred to the following post (https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Routing-signals-to-EMIOS-channel-from-T...) but have not been successful in replicating it in S32DS (i am not using MBDT or ebtresos).

Regards,

RChatterjee

0 Kudos
365 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi RChatterjee,

(signal input of eMIOS) eMIOS_n_ipp_ind_emios_ch[ ] can be the output of TRGMUX.
(signal output of eMIOS) eMIOS_n_ipp_do_emios_ch[ ] can be the input of TRGMUX.

S32K3xx_TRGMUX_connectivity.pngFigure 234. PCMC connections diagram.png

I hope this can be explained clearly.

0 Kudos
363 Views
RChatterjee
Contributor III

Hi Robin,
Yes, I am familiar with that. I am not sure if you have gone through the code or even the issue I have described, but this is not what I have problem with or require support with.

So, I am going to be extremely clear once again and restate my issue. I have followed the recommendations for the implementation as the RTD documents have described, but EVEN AFTER CONFIGURING THE EMIOS INPUT AS TRGMUX OUTPUT, I do not detect any output on the board. The code is identical to the one attached in my original post.

What is the difficulty you are facing to understand this, please let me know.

0 Kudos
357 Views
Robin_Shen
NXP TechSupport
NXP TechSupport
(external PWM signal) eMIOS_n_ipp_ind_emios_ch[ ] can be the output of TRGMUX. It cannot be used as input for TRGMUX. So I don't think the signal input of one eMIOS channel can be routing to another eMIOS channel as input.
 
If you connect the external PWM signal to SIUL_TRGMUX_IN0-15 (IO MUX), then as the input to TRGMUX, I think you can routing signal to the input of multiple eMiOS channels(eMIOSN_ipp_ind_emios_ch []) by TRGMUX.
0 Kudos
354 Views
RChatterjee
Contributor III

RChatterjee_0-1711638085892.png

My input to EMIOS is LCU_OUT. I have shared the image here. This configuration doesn't return me any output at EMIOS0_4. I am not linking EMIOS input to EMIOS output.

Also, from the diagram you shared, do I need to do any additional configuration for EMIOS_0_4 channel? Because I am not sure if I need to call it in the code in some way, I am directly routing LCU_OUT to it and then taking it at pin output.

Regards,

Rounak Chatterjee.

0 Kudos
319 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Sorry, I didn't read carefully the discussion of Routing signals to EMIOS channel from Trgmux (S32k3) you mentioned before, so I didn't understand the problem you encountered.
After your prompt, I checked your project again and made the following modifications:
Your project configures channels other than eMIOS0_CH3\CH7 as Emios_Pwm. Since (signal output of eMIOS) eMIOS_n_ipp_do_emios_ch[ ] is not the output of TRGMUX. 

Your project configure eMIOS0_CH7 as eMIOS_Icu, so I chose eMIOS0_CH7 for demonstration. TRGMUX_IP_INPUT_LCU0_LC0_OUT_I1 -> TRGMUX_IP_OUTPUT_EMIOS0_CH5_9_IPP_IND_CH7

// Siul2_Port_Ip_SetTrgMUXInput(564,PORT_INPUT_MUX_ALT3);
Siul2_Port_Ip_SetInputBuffer(NULL, 0, FALSE, 567-512, PORT_INPUT_MUX_ALT4);//eMIOS0_CH7  IMCR567 to 0x4 (TRGMUX_INT_OUT38)

S32K358_Input Muxing eMIOS_0_CH[7]_G SIUL_IMCR567 TRGMUX_INT_OUT38.png

Now, eMIOS will get signals from internal rather than external pins.  That is what you mentioned: My input to EMIOS is LCU_OUT.

0 Kudos