cancel
Showing results for 
Search instead for 
Did you mean: 

Choosing GPIO Context between Cortex M4 and Cortex A7 using STM32CubeMX

darla14
Senior

Hello ,

I have a few queries related to assignments of GPIO wrt to Cortex M4 and Cotex A7 . Task is to add a I2C peripheral to a GPIO and access it using Cortex M4.But I cant see the cortex assignment options ? I see on few but not on some on which I actually want.(like PA12)

0693W00000NpugHQAR.png 

Also I see pin locking on some GPIO? Does that mean I can’t connect anything to these GPIOS?

0693W00000NpuggQAB.png 

Also on the I2C1 , to which context it is assigned by default? Both Cortex M4 and A7 or to one of them?

0693W00000NpugqQAB.png please advise!

Thanks in advance!

D

1 ACCEPTED SOLUTION

Accepted Solutions
PatrickF
ST Employee

Hi @darla14​ ,

Please look at https://wiki.st.com/stm32mpu/wiki/How_to_assign_an_internal_peripheral_to_a_runtime_context

the only trick needed to assign pure GPIOs to Cortex-M4 (i.e. not used by a peripheral) is to right+click on the pin (set in GPIO input or output). Otherwise, the GPIO HAL initialization code is not generated.

Regards.

In order to give better visibility on the answered topics, please click on 'Select as Best' on the reply which solved your issue or answered your question. See also 'Best Answers'

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

View solution in original post

2 REPLIES 2
PatrickF
ST Employee

Hi @darla14​ ,

Please look at https://wiki.st.com/stm32mpu/wiki/How_to_assign_an_internal_peripheral_to_a_runtime_context

the only trick needed to assign pure GPIOs to Cortex-M4 (i.e. not used by a peripheral) is to right+click on the pin (set in GPIO input or output). Otherwise, the GPIO HAL initialization code is not generated.

Regards.

In order to give better visibility on the answered topics, please click on 'Select as Best' on the reply which solved your issue or answered your question. See also 'Best Answers'

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

Thanks @PatrickF​  let me try this !

Br