S32K322 emios 0 ch 9 SAOC

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

S32K322 emios 0 ch 9 SAOC

Jump to solution
997 Views
francescovico
Contributor III

Hello ,

I need to configure EMIOS0 CH9 in SAOC mode.

I would like enable COUNTER BUS A using CH23 and use this in CH9.

Attached the emios ConfigTools.

In the main the code is:

/* Init EMIOS MCL for enable global counter bus */

Emios_Mcl_Ip_Init(0, &Emios_Mcl_Ip_0_Config);

 

/* Init EMIOS OCU */

Emios_Ocu_Ip_Init(&Emios_Ocu_Ip_0_ModuleCfgPB_BOARD_InitPeripherals);

 

/* Enable EMIOS OCU Channel notification */

Emios_Ocu_Ip_EnableNotification(0,9);

/* Start EMIOS OCU Channel */

Emios_Ocu_Ip_StartChannel(0,9);

 

The Ocu doesn't work and any notification are done.

 

PS: using CH1 (that have internal counter) it's work .

Regards.

 

 

0 Kudos
Reply
1 Solution
874 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@francescovico

This is not a bug, your program should run normally when not in debug mode.
But I am a little puzzled, because I checked this option and it works fine, maybe it has something to do with the debugger.

 

View solution in original post

0 Kudos
Reply
9 Replies
970 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@francescovico

Could you please share the project so that i can help you to check it .

Or tell us the RTD version you're using, we can provide to you a simliar demo for your reference,.

0 Kudos
Reply
962 Views
francescovico
Contributor III

Hello @Senlent ,

attached a simple project that increment two variable at each ISR of two SAOC.

The EMIOS0 CH1 increment counter EMIOS0_OcuCh_1_ISR_cnt

The EMIOS0 CH9 increment counter EMIOS0_OcuCh_9_ISR_cnt

emios.png

 

How you can see the counter EMIOS0_OcuCh_9_ISR_cnt it's zero.

 

Regards, Francesco.

 

0 Kudos
Reply
950 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@francescovico

I tested the code you provided and it seems to work fine.

Attached is a screenshot of my test.

PS:I don't have a S32K322, so I tested the routine on a S32K344, which should be exactly the same

 

0 Kudos
Reply
935 Views
francescovico
Contributor III

It's very strange.

It's correct that CNT23 of EMIOS0 it's ever 0 ?

EMIOS0_CNT23.png

It's possible to have the .elf file of my project compiled using  S32K322 ?

I would like flash this elf file to see if it work fine.

Regards, Francesco.

0 Kudos
Reply
906 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@francescovico

No, CNT23 should work, it shouldn't be 0 all the time.

Senlent_0-1748482139397.png

and i have attach the "TEST_S32K322_M7_0.elf" for your test.

As i said before, i test your code in S32K344,not S32K322, but i think the result should be same with S32K322.

0 Kudos
Reply
892 Views
francescovico
Contributor III
Hello, with your .elf file on my micro S32K322, CNT23 it's ever 0.
S32K322 it's dual core, this could be the cause of my problem?
0 Kudos
Reply
884 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@francescovico

It seems that there is a connection, otherwise I can't think of any other factors. It seems that eMios0-ch23 is not working.

Is it possible to download and run only "TEST_S32K322_M7_0.elf" only, without burning "TEST_S32K322_M7_1.elf",please have a try again.

 

Also, could you please change below setting and have a try again.

Senlent_1-1748506661061.png

 

 

0 Kudos
Reply
878 Views
francescovico
Contributor III

Hello,

now It's working fine!

To work fine, it's necessary remove flag below:

 

EMIOS_allow_debug_mode.png

This is a Bug in RTD ?

Thank you a lot !

 Francesco.

 

0 Kudos
Reply
875 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@francescovico

This is not a bug, your program should run normally when not in debug mode.
But I am a little puzzled, because I checked this option and it works fine, maybe it has something to do with the debugger.

 

0 Kudos
Reply