Attach ISR to Pulse Counter

gfvalvo
Posts: 9
Joined: Thu Dec 24, 2020 3:06 pm

Attach ISR to Pulse Counter

Postby gfvalvo » Sat May 08, 2021 10:48 pm

Hi All.

So, scanning through the API reference, it appears there are two different methods to attach an ISR the Pulse Counter:

* pcnt_isr_service_install() / pcnt_isr_handler_add()
* pcnt_isr_register()

However, I haven't yet found an explanation of what the difference between these two is. Anyone have an explanation or a pointer to an explanation?

Thanks.

WiFive
Posts: 3237
Joined: Tue Dec 01, 2015 7:35 am

Re: Attach ISR to Pulse Counter

Postby WiFive » Sun May 09, 2021 4:40 am

pcnt_isr_register is only if you want to write your own low level isr

gfvalvo
Posts: 9
Joined: Thu Dec 24, 2020 3:06 pm

Re: Attach ISR to Pulse Counter

Postby gfvalvo » Sun May 09, 2021 11:22 am

Thanks. Is that distinction documented somewhere?

WiFive
Posts: 3237
Joined: Tue Dec 01, 2015 7:35 am

Re: Attach ISR to Pulse Counter

Postby WiFive » Mon May 10, 2021 2:14 am

Not sure, but it is common to most of the peripheral drivers. The interrupt service manages its own isr so it will call pcnt_isr_register internally.

Who is online

Users browsing this forum: Bing [Bot], DylanWork and 52 guests