You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to adopt this example to implement a custom interrupt handler. The example works but I found two issues when modifying it for my use case.
According to the example, XINTR_IS_EDGE_TRIGGERED (defined as 3) should be passed as the TriggerType parameter to XGetEncodedIntrId to define an edge triggered interrupt. This is not one of the valid values given by the comment for XGetEncodedIntrId.
* @param : TriggerType Trigger type for targted interrupt ID (documented in
* TRM of targeted SoC)
* 1 = low-to-high edge triggered
* 2 = high-to-low edge triggered
* 4 = active high level-sensitive
* 8 = active low level-sensitive
This causes problems down the line. For example in XSetPriorityTriggerType where the value is compared against 1 and 2. A level trigger is selected when we wanted an edge trigger.
I am trying to adopt this example to implement a custom interrupt handler. The example works but I found two issues when modifying it for my use case.
According to the example,
XINTR_IS_EDGE_TRIGGERED
(defined as3
) should be passed as theTriggerType
parameter toXGetEncodedIntrId
to define an edge triggered interrupt. This is not one of the valid values given by the comment forXGetEncodedIntrId
.embeddedsw/lib/bsp/standalone/src/common/intr/xinterrupt_wrap.h
Line 61 in 5688620
embeddedsw/lib/bsp/standalone/src/common/intr/xinterrupt_wrap.c
Lines 465 to 470 in 5688620
This causes problems down the line. For example in
XSetPriorityTriggerType
where the value is compared against1
and2
. A level trigger is selected when we wanted an edge trigger.embeddedsw/lib/bsp/standalone/src/common/intr/xinterrupt_wrap.c
Lines 304 to 309 in 5688620
In the implementation of
XGetEncodedIntrId
,XINTC_INTR_TYPE_SHIFT
is used directly as a bitmask when it should instead be used to shift a bit.embeddedsw/lib/bsp/standalone/src/common/intr/xinterrupt_wrap.c
Lines 500 to 504 in 5688620
(also, there is a typo in the change data of the example file)
embeddedsw/XilinxProcessorIPLib/drivers/scugic/examples/xscugic_example.c
Line 39 in 5688620
The text was updated successfully, but these errors were encountered: