S32K3 PIT timer callback

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

S32K3 PIT timer callback

Jump to solution
1,282 Views
Luca_Ferioli
Contributor I

I'm starting off development on a platform which I’ve never used before, I’m working on the S32K3X4EVB-T172: i made a blinker to get the hang of the various tools, first and foremost the Pins tool.
I feel like i jumped through too many hoops in order to get this done, i would like anyone to point out whether i missed something or if i overcomplicated things.

Here is what confused me the most:

1) the PIT driver does not provide a function to clear the interrupt flag of the PIT0 peripheral: since i could not find a way to access the registers directly as i was used to do on MPC5604C, i modified the Pit_Ip driver to provide said function; this is clearly sub-optimal, since these changes need to be manually reapplied each time the Pins regenerates the code; where did i go wrong?

2) after routing the needed pins in the Pins utility and configuring things like pull-ups, etc., i was expecting the tool to provide an initialization function for said pins somewhere: Eclipse glitching out and not correctly displaying code as active based on #define directives made me search far and wide to locate all the init functions i needed: is this mentioned anywhere in the documentation?

3) i did not understand what difference it makes whether i use the Port driver provided by the MCAL/Autosar layer vs. the Siul2_Port driver.

4) to make my ISR work, i have inserted my own PIT0 callback in the vector table, and selectively enabled the matching IRQ: while it works, i have the feeling this is not the "intended" way; did i do things the right way, or am i missing out on some other Pins functionality?

I am attaching my test project, feel free to sift through and provide feedback, at such an early stage it's gonna be crucial

--
Thanks, LF
Tags (3)
0 Kudos
Reply
1 Solution
1,265 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@Luca_Ferioli

1.for your question 1 and 4

inCtrl_Ip module used to manage interrupt 

Senlent_0-1703040878802.png

Senlent_1-1703041023724.png

Senlent_2-1703041054949.png

 

2.There is no such document, but you can refer to the routines related to the SIUL module provided below by the IDE.

 

3.RTD includes SDK(Drivers) and mcal. If there is no AUTOSAR requirement, you can use Drivers.

Senlent_3-1703041512518.png

 

View solution in original post

2 Replies
1,266 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@Luca_Ferioli

1.for your question 1 and 4

inCtrl_Ip module used to manage interrupt 

Senlent_0-1703040878802.png

Senlent_1-1703041023724.png

Senlent_2-1703041054949.png

 

2.There is no such document, but you can refer to the routines related to the SIUL module provided below by the IDE.

 

3.RTD includes SDK(Drivers) and mcal. If there is no AUTOSAR requirement, you can use Drivers.

Senlent_3-1703041512518.png

 

1,255 Views
Luca_Ferioli
Contributor I

This clears up my doubts, thank you for your time @Senlent 

--
Thanks, LF
0 Kudos
Reply