Dear Giovanni,
I need to use four input capture module for Timer2, the hardware is developed like that.
Currently chibios input capture interrupts support 2 channels for a timer but I have to use four.
So I used STM32 standard library interrupts for input capture alone.
Now I get hardfault error which happens after exiting input capture interrupt.
Can I use chibios alongside STM32 standard library interrupts.
Please advice.
InputCapture Interrupts
Moderator: RoccoMarco
- Giovanni
- Site Admin
- Posts: 14892
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: InputCapture Interrupts
Hi,
Yes, you can use the library with ChibiOS, you need to pay attention to the interrupt handlers, you must write them using the ChibiOS macros. If the library provides you an interrupt handler then call it from within a ChibiOS ISR: IRQ--->ChibiOS ISR--->Library ISR.
Giovanni
Yes, you can use the library with ChibiOS, you need to pay attention to the interrupt handlers, you must write them using the ChibiOS macros. If the library provides you an interrupt handler then call it from within a ChibiOS ISR: IRQ--->ChibiOS ISR--->Library ISR.
Giovanni
Re: InputCapture Interrupts
You can try to use the timcap driver in the drivers collection.
https://github.com/ChibiOS/ChibiOS-Drivers
Works will all 4 channels.
https://github.com/ChibiOS/ChibiOS-Drivers
Works will all 4 channels.
Re: InputCapture Interrupts
Thanks Giovanni.I will do as you mentioned.
@mobyfab, Thanks. I am still using V2.6.1 but the driver you pointed out is for V3.0
Shall I shift to V3.0?
@mobyfab, Thanks. I am still using V2.6.1 but the driver you pointed out is for V3.0
Shall I shift to V3.0?
- Giovanni
- Site Admin
- Posts: 14892
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: InputCapture Interrupts
Moving to 3.0 is generally a good idea. 2.6.x will be maintained for at least 2 years but only for bug fixes, 3.0 will have all the new developments.
Giovanni
Giovanni