Skip to content

Commit b6befee

Browse files
committed
Properly configure PRS API so it actually delegates the shared interrupt slot to the appropriate peripheral
1 parent dc63202 commit b6befee

File tree

3 files changed

+74
-4
lines changed
  • targets/TARGET_NORDIC/TARGET_NRF5x

3 files changed

+74
-4
lines changed

targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52832/config/sdk_config.h

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4038,9 +4038,45 @@
40384038

40394039
// </e>
40404040

4041+
// <e> NRFX_PRS_ENABLED - nrfx_prs - Peripheral Resource Sharing module
4042+
//==========================================================
40414043
#ifndef NRFX_PRS_ENABLED
40424044
#define NRFX_PRS_ENABLED 1
40434045
#endif
4046+
// <q> NRFX_PRS_BOX_0_ENABLED - Enables box 0 in the module.
4047+
4048+
4049+
#ifndef NRFX_PRS_BOX_0_ENABLED
4050+
#define NRFX_PRS_BOX_0_ENABLED 1
4051+
#endif
4052+
4053+
// <q> NRFX_PRS_BOX_1_ENABLED - Enables box 1 in the module.
4054+
4055+
4056+
#ifndef NRFX_PRS_BOX_1_ENABLED
4057+
#define NRFX_PRS_BOX_1_ENABLED 1
4058+
#endif
4059+
4060+
// <q> NRFX_PRS_BOX_2_ENABLED - Enables box 2 in the module.
4061+
4062+
4063+
#ifndef NRFX_PRS_BOX_2_ENABLED
4064+
#define NRFX_PRS_BOX_2_ENABLED 1
4065+
#endif
4066+
4067+
// <q> NRFX_PRS_BOX_3_ENABLED - Enables box 3 in the module.
4068+
4069+
4070+
#ifndef NRFX_PRS_BOX_3_ENABLED
4071+
#define NRFX_PRS_BOX_3_ENABLED 1
4072+
#endif
4073+
4074+
// <q> NRFX_PRS_BOX_4_ENABLED - Enables box 4 in the module.
4075+
4076+
4077+
#ifndef NRFX_PRS_BOX_4_ENABLED
4078+
#define NRFX_PRS_BOX_4_ENABLED 1
4079+
#endif
40444080

40454081
// </e>
40464082

targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52840/config/sdk_config.h

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4040,9 +4040,47 @@
40404040

40414041
// </e>
40424042

4043+
// <e> NRFX_PRS_ENABLED - nrfx_prs - Peripheral Resource Sharing module
4044+
//==========================================================
40434045
#ifndef NRFX_PRS_ENABLED
40444046
#define NRFX_PRS_ENABLED 1
40454047
#endif
4048+
// <q> NRFX_PRS_BOX_0_ENABLED - Enables box 0 in the module.
4049+
4050+
4051+
#ifndef NRFX_PRS_BOX_0_ENABLED
4052+
#define NRFX_PRS_BOX_0_ENABLED 1
4053+
#endif
4054+
4055+
// <q> NRFX_PRS_BOX_1_ENABLED - Enables box 1 in the module.
4056+
4057+
4058+
#ifndef NRFX_PRS_BOX_1_ENABLED
4059+
#define NRFX_PRS_BOX_1_ENABLED 1
4060+
#endif
4061+
4062+
// <q> NRFX_PRS_BOX_2_ENABLED - Enables box 2 in the module.
4063+
4064+
4065+
#ifndef NRFX_PRS_BOX_2_ENABLED
4066+
#define NRFX_PRS_BOX_2_ENABLED 1
4067+
#endif
4068+
4069+
// <q> NRFX_PRS_BOX_3_ENABLED - Enables box 3 in the module.
4070+
4071+
4072+
#ifndef NRFX_PRS_BOX_3_ENABLED
4073+
#define NRFX_PRS_BOX_3_ENABLED 1
4074+
#endif
4075+
4076+
// <q> NRFX_PRS_BOX_4_ENABLED - Enables box 4 in the module.
4077+
4078+
4079+
#ifndef NRFX_PRS_BOX_4_ENABLED
4080+
#define NRFX_PRS_BOX_4_ENABLED 1
4081+
#endif
4082+
4083+
// </e>
40464084

40474085
// <e> NRFX_TWI_ENABLED - nrfx_twi - TWI peripheral driver
40484086
//==========================================================

targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/modules/nrfx/drivers/src/nrfx_twi.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -706,22 +706,18 @@ static void twi_irq_handler(NRF_TWI_Type * p_twi, twi_control_block_t * p_cb)
706706

707707
}
708708

709-
#if 0
710709
#if NRFX_CHECK(NRFX_TWI0_ENABLED)
711710
void nrfx_twi_0_irq_handler(void)
712711
{
713712
twi_irq_handler(NRF_TWI0, &m_cb[NRFX_TWI0_INST_IDX]);
714713
}
715714
#endif
716-
#endif
717715

718-
#if 0
719716
#if NRFX_CHECK(NRFX_TWI1_ENABLED)
720717
void nrfx_twi_1_irq_handler(void)
721718
{
722719
twi_irq_handler(NRF_TWI1, &m_cb[NRFX_TWI1_INST_IDX]);
723720
}
724721
#endif
725-
#endif
726722

727723
#endif // NRFX_CHECK(NRFX_TWI_ENABLED)

0 commit comments

Comments
 (0)