cancel
Showing results for 
Search instead for 
Did you mean: 

How to use peripherals in both core?

MDeva.1
Associate II

Hello,

I am working on Nucleo-h745ziq board. I am enable the UASART3 ,the intialization in done in cortex m7 and I try to use in both core,but only core 7 USART3 is working in core m4 USART3 is not get worked ,the code is as follows

core m7 code:

 HAL_UART_Transmit(&huart3, "CORE7",6, 100);

 HAL_Delay(3000);

 HAL_GPIO_WritePin(GPIOE, GPIO_PIN_1, GPIO_PIN_SET);

 HAL_Delay(3000);

 HAL_GPIO_WritePin(GPIOE, GPIO_PIN_1, GPIO_PIN_RESET);

   HAL_Delay(3000);

core M4 code:

 HAL_GPIO_WritePin(GPIOB, GPIO_PIN_0, GPIO_PIN_SET);

 HAL_Delay(3000);

 HAL_GPIO_WritePin(GPIOB, GPIO_PIN_0, GPIO_PIN_RESET);

 HAL_Delay(3000);

HAL_UART_Transmit(&huart3, "CORE4",6, 100);

 HAL_Delay(3000);

I want to use peripherals in both core also I want to transfer data from one core to another how I can do it there is some example code is available?

2 REPLIES 2

It's an STM32 MCU not MPU

The cores share some commonly visible RAM which can be used to communicate data and structures.

There is HSEM unit for communicating/interrupting between cores.

The peripherals aren't probably sharable in the manner you want, you'd likely want to manage ownership so as not to tread on your own feet. At the very least pick one that is going to initialize the pins, clocks and peripheral.

The design really has most of the peripherals on the CM4 core, and you might want to use this as the IO processor.

I recommend mastering single core programming first. Then decide how to partition your design to use each appropriately.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

I have to transfer data betwwen two core how I can transfer the data ,can you help me there was any example on that