File tree Expand file tree Collapse file tree 7 files changed +29698
-28969
lines changed
TARGET_Cypress/TARGET_PSOC6_FUTURE
TARGET_FUTURE_SEQUANA_M0_PSA
TARGET_FUTURE_SEQUANA_PSA/prebuilt Expand file tree Collapse file tree 7 files changed +29698
-28969
lines changed Original file line number Diff line number Diff line change 67
67
* multiplexer. This requires that we define which of the 32 NVIC channels is used
68
68
* by which interrupt. This is done here.
69
69
*/
70
- #define CY_M0_CORE_IRQ_CHANNEL_US_TICKER ((IRQn_Type)0)
70
+ #define CY_M0_CORE_IRQ_CHANNEL_LP_TICKER ((IRQn_Type)0)
71
+ #define CY_M0_CORE_IRQ_CHANNEL_IPC_SYS ((IRQn_Type)1)
72
+ #define CY_M0_CORE_IRQ_CHANNEL_IPC_USR ((IRQn_Type)2)
73
+ #define CY_M0_CORE_IRQ_CHANNEL_PSA_MAILBOX ((IRQn_Type)3)
71
74
#define CY_M0_CORE_IRQ_CHANNEL_SERIAL ((IRQn_Type)4)
72
- #define CY_M0_CORE_IRQ_CHANNEL_BLE ((IRQn_Type)3)
75
+ #define CY_M0_CORE_IRQ_CHANNEL_BLE ((IRQn_Type)7)
76
+ #define CY_M0_CORE_IRQ_CHANNEL_US_TICKER ((IRQn_Type)8)
73
77
74
78
/** Identifiers used in allocation of NVIC channels.
75
79
*/
78
82
#define CY_BLE_IRQN_ID (0x300)
79
83
#define CY_GPIO_IRQN_ID (0x400)
80
84
#define CY_LP_TICKER_IRQN_ID (0x500)
85
+ #define CY_PSA_MAILBOX_IRQN_ID (0x600)
81
86
#endif
Original file line number Diff line number Diff line change 20
20
21
21
#include "spm_api.h"
22
22
23
- #include "cmsis .h"
23
+ #include "device .h"
24
24
#include "cyip_ipc.h"
25
25
#include "cy_ipc_drv.h"
26
26
#include "cy_syslib.h"
27
27
#include "cy_sysint.h"
28
-
28
+ #include "psoc6_utils.h"
29
+ #include "mbed_error.h"
29
30
30
31
31
32
/* ------------------------------------ Definitions ---------------------------------- */
@@ -65,9 +66,12 @@ void mailbox_init(void)
65
66
66
67
// Configure interrupts ISR / MUX and priority
67
68
cy_stc_sysint_t ipc_intr_Config ;
68
- ipc_intr_Config .intrSrc = ( IRQn_Type ) NvicMux3_IRQn ; // Can be any Mux we choose
69
+ ipc_intr_Config .intrSrc = CY_M0_CORE_IRQ_CHANNEL_PSA_MAILBOX ;
69
70
ipc_intr_Config .cm0pSrc = (cy_en_intr_t )cpuss_interrupts_ipc_0_IRQn + SPM_IPC_NOTIFY_CM0P_INTR ; // Must match the interrupt we trigger using NOTIFY on CM4
70
71
ipc_intr_Config .intrPriority = 1 ;
72
+ if (cy_m0_nvic_reserve_channel (CY_M0_CORE_IRQ_CHANNEL_PSA_MAILBOX , CY_PSA_MAILBOX_IRQN_ID ) == (IRQn_Type )(-1 )) {
73
+ error ("PSA SPM Mailbox NVIC channel reservation conflict." );
74
+ }
71
75
(void )Cy_SysInt_Init (& ipc_intr_Config , ipc_interrupt_handler );
72
76
73
77
// Set specific NOTIFY interrupt mask only.
You can’t perform that action at this time.
0 commit comments