mirror of https://github.com/ARMmbed/mbed-os.git
[PSOC6]: Fix for static resource manager.
parent
86915d9a7e
commit
30f0bc65ce
|
@ -64,11 +64,11 @@
|
|||
// Reservations below apply to default M0 hex image.
|
||||
|
||||
// P0_0 and p0_1 reserved for WCO, P6-6 and P6_7 reserved for SWD
|
||||
#define M0_ASSIGNED_PORTS SRM_PORT(0, 0x03), SRM_PORT(6, 0xc0), SRM_PORT(11, 0x02)
|
||||
// 8-bit divider 0 reserved for us ticker.
|
||||
#define M0_ASSIGNED_DIVIDERS SRM_DIVIDER(CY_SYSCLK_DIV_8_BIT, 0x01), \
|
||||
SRM_DIVIDER(CY_SYSCLK_DIV_16_BIT, 0x01)
|
||||
#define M0_ASSIGNED_PORTS SRM_PORT(0, 0x03), SRM_PORT(6, 0xc0)
|
||||
// 8-bit divider 0 reserved for us ticker
|
||||
#define M0_ASSIGNED_DIVIDERS SRM_DIVIDER(CY_SYSCLK_DIV_8_BIT, 0x01)
|
||||
#define M0_ASSIGNED_SCBS
|
||||
#define M0_ASSIGNED_TCPWMS
|
||||
// TCPWM 0,0 used for us_ticker
|
||||
#define M0_ASSIGNED_TCPWMS SRM_TCPWM(0)
|
||||
|
||||
/* End of File */
|
||||
|
|
|
@ -101,6 +101,7 @@ do { \
|
|||
|
||||
#define DEFAULT_PORT_RES 0xff
|
||||
#define DEFAULT_DIVIDER_RES 0xffff
|
||||
#define DEFAULT_DIVIDER8_RES 0xffff
|
||||
#define DEFAULT_SCM_RES 1
|
||||
#define DEFAULT_TCPWM_RES 1
|
||||
|
||||
|
@ -438,6 +439,21 @@ void cy_get_bd_mac_address(uint8_t *buffer)
|
|||
|
||||
void cy_srm_initialize(void)
|
||||
{
|
||||
#if defined(TARGET_MCU_PSOC6_M0) || PSOC6_DYNSRM_DISABLE || !defined(__MBED__)
|
||||
uint32_t i;
|
||||
|
||||
for (i = 0; i < CY_NUM_PSOC6_PORTS; ++i) {
|
||||
port_reservations[i] = DEFAULT_PORT_RES;
|
||||
}
|
||||
|
||||
for (i = 0; i < NUM_SCB; ++i) {
|
||||
scb_reservations[i] = DEFAULT_SCM_RES;
|
||||
}
|
||||
|
||||
for (i = 0; i < NUM_TCPWM; ++i) {
|
||||
tcpwm_reservations[i] = DEFAULT_TCPWM_RES;
|
||||
}
|
||||
|
||||
#if PSOC6_DYNSRM_DISABLE
|
||||
#ifdef M0_ASSIGNED_PORTS
|
||||
SRM_INIT_RESOURCE(uint8_t, port_reservations,, M0_ASSIGNED_PORTS);
|
||||
|
@ -452,5 +468,6 @@ void cy_srm_initialize(void)
|
|||
SRM_INIT_RESOURCE(uint8_t, tcpwm_reservations,, M0_ASSIGNED_TCPWMS);
|
||||
#endif
|
||||
#endif // PSOC6_DYNSRM_DISABLE
|
||||
#endif // defined(TARGET_MCU_PSOC6_M0) || PSOC6_DSRM_DISABLE || !defined(__MBED__)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue