2019-04-14 12:00 AM
Are there any resources that show how to configure the communication peripherals ( USB,. USART) when using the STM32MP1 based parts. I tried to configure a USART and USB peripheral, but STMCube generates a dialog that indicates that this peripheral must be configured by hand. I checked in the examples under STM32CubeMP1 repo and in the UART exampless, it looks like the UART pins are not configured ( looks like MX_GPIO_Init just enables the clocks ).
I would like to use the USART and USB peripherals from the M4 side on this processor
Solved! Go to Solution.
2019-04-15 02:06 AM
Hello
as a general reference, please refer to https://wiki.st.com/stm32mpu/wiki/STM32MP15_peripherals_overview to check which peripherals are usable/sharable between Cortex-A7 (Linux) and Cortex-M4 (HAL) world.
USART1 is reserved for Linux/OP-TEE usage, so, we recommend to use other UARTs. If you absolutely want to use USART1 with Cortex-M4 (i.e. no more choice in muxing choices), it requires some changes in device tree and add all HAL related functions (GPIO mux, UART init, interrupt handler, etc..) in your M4 software. This is not handled by STM32CubeMx.
For all other USARTs/UARTs, there could be assigned to Cortex-M4 in STM32CubeMx, and it will generates all relevant code and device tree settings.
Have you look at https://wiki.st.com/stm32mpu/wiki/USART_internal_peripheral ?
For OTG IP, things are different as OTG is always used by uBoot during board Flashing (i.e. using STM32CubeProgrammer).
It is no possible to use it with Cortex-M4. We did not provide HAL library and free USB stack for neither USBH and OTG IPs.
OTG device tree configuration is available in wiki https://wiki.st.com/stm32mpu/wiki/OTG_device_tree_configuration
Could you share your use case of having USB controlled on Cortex-M4 side ?
2019-04-15 02:06 AM
Hello
as a general reference, please refer to https://wiki.st.com/stm32mpu/wiki/STM32MP15_peripherals_overview to check which peripherals are usable/sharable between Cortex-A7 (Linux) and Cortex-M4 (HAL) world.
USART1 is reserved for Linux/OP-TEE usage, so, we recommend to use other UARTs. If you absolutely want to use USART1 with Cortex-M4 (i.e. no more choice in muxing choices), it requires some changes in device tree and add all HAL related functions (GPIO mux, UART init, interrupt handler, etc..) in your M4 software. This is not handled by STM32CubeMx.
For all other USARTs/UARTs, there could be assigned to Cortex-M4 in STM32CubeMx, and it will generates all relevant code and device tree settings.
Have you look at https://wiki.st.com/stm32mpu/wiki/USART_internal_peripheral ?
For OTG IP, things are different as OTG is always used by uBoot during board Flashing (i.e. using STM32CubeProgrammer).
It is no possible to use it with Cortex-M4. We did not provide HAL library and free USB stack for neither USBH and OTG IPs.
OTG device tree configuration is available in wiki https://wiki.st.com/stm32mpu/wiki/OTG_device_tree_configuration
Could you share your use case of having USB controlled on Cortex-M4 side ?