STM32H745-Disco: How to allocate the peripherals for a core (CM4 or CM7) in an *empty project*?
Hi all,
Reading page 400 of RM0399 (Reference manual STM32H745/755 and STM32H747/757). It talks about how to allocate peripherals for each core. But I don't understand. I can't seem to find the PERxEN bit in either RCC_DnxxxxENR or RCC_C1_DnxxxxENR registers.
How do I allocate the green and red LEDs (pins) of this board to CM4? or green to CM4 and red to CM7?
Here is the port pin initialization code I have and some #defines. Thanks:
#define RED_LED_PORT GPIOI //PI13 = LD2 = Red LED 0=on
#define RED_LED_PIN GPIO_PIN_13
#define GREEN_LED_PORT GPIOJ //PJ2 = LD1 = Green LED 0=on
#define GREEN_LED_PIN GPIO_PIN_2
__HAL_RCC_GPIOI_CLK_ENABLE();
__HAL_RCC_GPIOJ_CLK_ENABLE();
//Configure GPIO pin Output Level for Red LED. GPIO_PIN_SET = 1 = off
HAL_GPIO_WritePin(RED_LED_PORT, RED_LED_PIN, GPIO_PIN_SET);
//Configure GPIO pin Output Level for Green LED. GPIO_PIN_SET = 1 = off
HAL_GPIO_WritePin(GREEN_LED_PORT, GREEN_LED_PIN, GPIO_PIN_SET);
//Configure and init. GPIO pin
GPIO_InitStruct.Pin = RED_LED_PIN;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(RED_LED_PORT, &GPIO_InitStruct);
//Configure and init. GPIO pin
GPIO_InitStruct.Pin = GREEN_LED_PIN;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(GREEN_LED_PORT, &GPIO_InitStruct);