cancel
Showing results for 
Search instead for 
Did you mean: 

The PIT_0 timer interrupt is triggered only once after the reset and then not anymore. How to ensure that the timer retriggers every milisecond or second?

FShak.2
Associate

I am trying to use the example created by the SPC5 studio with interrupts. It has a PIT_0 (vector 227) configured. What i observed is that the interrupt is triggered only once after the application starts and is not triggered any more. As far as I understand from the datasheet, the respective interrupt register bit is to be reset by writing 1 to it and then the interrupt is cleared and ready to be retriggered. On the same lines I also configured the STM interrupt but it has the same behaviour. After the application starts interrupt is triggered once and not anymore. Could someone please help and let me know what are all the necessary steps in initialisation and while clearing the interrupt so that the ISR is triggered everytime the timer has met its criteria.

Kind regards,

Fahad

1 ACCEPTED SOLUTION

Accepted Solutions
Erwan YVIN
ST Employee

Hello Fahad ,

the initialisation is made by pit_lld_init()

do not forget to configure the pit channel and a good frequency.

0693W00000GX6qXQAT.png 

Best Regards

Erwan

View solution in original post

2 REPLIES 2
Erwan YVIN
ST Employee

Hello Fahad ,

the initialisation is made by pit_lld_init()

do not forget to configure the pit channel and a good frequency.

0693W00000GX6qXQAT.png 

Best Regards

Erwan

Hello Erwan,

Thanks for the prompt reply. Unfortunately I am not able to find the window, the one you have used for the screenshot. Instead I see the following options and configurations.

In the Project outline I see the following options:

0693W00000GXEo5QAH.png 

Under IRQ component RLA I see the following configurations:0693W00000GXEoPQAX.png0693W00000GXEoFQAX.pngWhere do I find the low level drivers component RLA window? and which example project are you using?

I used the IRQ exmaple project for SPC58NE series of microcontroller.

Hence coming back to my question, will I able to able to land in the ISR after every timeout as expected? Because as of now the interrupt is triggered only once after reset and not anymore.

Thanks in advance.

Kind regards,

Fahad