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
Complex use-case usually requires IRQ priorities tuning according to the specific time constraints.
Since setting IRQ priority needs the knowledge of the particular device IRQ line numbers that is normally hidden by HAL, it is reasonable to add the new HAL API call to reuse the information from device description structure.
Please see code below, this is the example of the possible IRQ priority control command implementation for I2C driver:
the new command ID definition in device/ip/ip_hal/inc/dev_iic.h:
/**
* Set the required IRQ priority level
* - Param type : int32_t
* - Param usage :
* - Return value explanation :
*/
#define IIC_CMD_SET_IRQ_PRIO DEV_SET_IIC_SYSCMD(18)
IRQ priority setting call (this call might be shared and declared outisde the I2C driver code, for example, as a macro) and the new command handler in device/ip/subsystem/iic/ss_i2c_master.c
/* an inline procedure that sets the IRQ priority */
Inline void ss_iic_set_irq_priority(uint32_t vector, uint32_t priority)
{
_arc_aux_write(0x40b, vector); /*IRQ_SELECT*/
_arc_aux_write(0x206, priority); /*IRQ_LEVEL*/
}
<...>
/* ...and finally adding the new command handler */
int32_t ss_iic_master_close(SS_IIC_MASTER_DEV_CONTEXT *ctx)
{
<...>
case IIC_CMD_SET_IRQ_PRIO:
val32 = (uint32_t)param;
ss_iic_set_irq_priority(ctx->int_err, val32);
ss_iic_set_irq_priority(ctx->int_rx_avail, val32);
ss_iic_set_irq_priority(ctx->int_tx_req, val32);
ss_iic_set_irq_priority(ctx->int_stop_det, val32);
break;
<...>
}
The text was updated successfully, but these errors were encountered:
Issue Summary
Complex use-case usually requires IRQ priorities tuning according to the specific time constraints.
Since setting IRQ priority needs the knowledge of the particular device IRQ line numbers that is normally hidden by HAL, it is reasonable to add the new HAL API call to reuse the information from device description structure.
Please see code below, this is the example of the possible IRQ priority control command implementation for I2C driver:
The text was updated successfully, but these errors were encountered: