About rosserial_stm32 on STM32 L4 series
Excuse me, I am not fluent in English.So I use machine translation.
I tried to operate STM32 L4 series using this library ( https://github.com/yoneken/rosserial_... ).
I referred to here(https://www.slideshare.net/k_yone/rosserial-stm32).
However, I got such an error.
$rosrun rosserial_python serial_node.py _port:=/dev/ttyACM0 _baud:=57600
[INFO] [1553585723.997853]: ROS Serial Python Node
[INFO] [1553585724.007428]: Connecting to /dev/ttyACM0 at 57600 baud
[INFO] [1553585726.113745]: Requesting topics...
[ERROR] [1553585741.116108]: Unable to sync with device; possible link problem or link software version mismatch such as hydro rosserial_python with groovy Arduino
How can I solve this error?
##environment##
Ubuntu 16.04 + kinetic
STM32L476
SW4STM32 + CubeMX + ST-Link
##used commands##
$ code STM32Hardware.h
In STM32Hardware.h
-#include "stm32f3xx_hal.h"
-#include "stm32f3xx_hal_uart.h"
-#include "stm32f3xx_hal_tim.h"
+#include "stm32l4xx_hal.h"
+#include "stm32l4xx_hal_uart.h"
+#include "stm32l4xx_hal_tim.h"
then...
$ cd ~/catkin_ws
$ catkin_make
$ cd ./src/rosserial_stm32/src/ros_lib/examples
$ cp -r chatter ~/workspace
$ cd ~/workspace/chatter
$ rosrun rosserial_stm32 make_libraries.py .
Start CubeMX and load chatter.ioc.
Configure peripheral settings.
Configuration chatter
STM32CubeMX 5.0.1
Date 03/27/2019
MCU STM32L476RGTx
PERIPHERALS MODES FUNCTIONS PINS
RCC Crystal/Ceramic Resonator RCC_OSC32_IN PC14-OSC32_IN (PC14)
RCC Crystal/Ceramic Resonator RCC_OSC32_OUT PC15-OSC32_OUT (PC15)
SYS Serial Wire SYS_JTCK-SWCLK PA14 (JTCK-SWCLK)
SYS Serial Wire SYS_JTMS-SWDIO PA13 (JTMS-SWDIO)
SYS SysTick SYS_VS_Systick VP_SYS_VS_Systick
TIM2 Internal Clock TIM2_VS_ClockSourceINT VP_TIM2_VS_ClockSourceINT
USART2 Asynchronous USART2_RX PA3
USART2 Asynchronous USART2_TX PA2
Pin Nb PINs FUNCTIONs LABELs
2 PC13 GPIO_EXTI13 B1 [Blue PushButton]
3 PC14-OSC32_IN (PC14) RCC_OSC32_IN
4 PC15-OSC32_OUT (PC15) RCC_OSC32_OUT
5 PH0-OSC_IN (PH0)* RCC_OSC_IN
6 PH1-OSC_OUT (PH1)* RCC_OSC_OUT
16 PA2 USART2_TX USART_TX
17 PA3 USART2_RX USART_RX
21 PA5 GPIO_Output LD2 [green Led]
46 PA13 (JTMS-SWDIO) SYS_JTMS-SWDIO TMS
49 PA14 (JTCK-SWCLK) SYS_JTCK-SWCLK TCK
55 PB3 (JTDO-TRACESWO)* SYS_JTDO-SWO SWO
PERIPHERALS MODES FUNCTIONS PINS
RCC Crystal/Ceramic Resonator RCC_OSC32_IN PC14-OSC32_IN (PC14)
RCC Crystal/Ceramic Resonator RCC_OSC32_OUT PC15-OSC32_OUT (PC15)
SYS Serial Wire SYS_JTCK-SWCLK PA14 (JTCK-SWCLK)
SYS Serial Wire SYS_JTMS-SWDIO PA13 (JTMS-SWDIO)
SYS SysTick SYS_VS_Systick VP_SYS_VS_Systick
TIM2 Internal Clock TIM2_VS_ClockSourceINT VP_TIM2_VS_ClockSourceINT
USART2 Asynchronous USART2_RX PA3
USART2 Asynchronous USART2_TX PA2
Pin Nb PINs FUNCTIONs LABELs
2 PC13 GPIO_EXTI13 B1 [Blue PushButton]
3 PC14-OSC32_IN (PC14) RCC_OSC32_IN
4 PC15-OSC32_OUT (PC15) RCC_OSC32_OUT
5 PH0-OSC_IN (PH0)* RCC_OSC_IN
6 PH1-OSC_OUT (PH1)* RCC_OSC_OUT
16 PA2 USART2_TX USART_TX
17 PA3 USART2_RX USART_RX
21 PA5 GPIO_Output LD2 [green Led]
46 PA13 (JTMS-SWDIO) SYS_JTMS-SWDIO TMS
49 PA14 (JTCK-SWCLK) SYS_JTCK-SWCLK TCK
55 PB3 (JTDO-TRACESWO)* SYS_JTDO-SWO SWO
SOFTWARE PROJECT
``
Project Settings :
Project Name : chatter
Project Folder : /home/hoge1/workspace/chatter
Toolchain / IDE : SW4STM32
Firmware Package Name and Version : STM32Cube FW_L4 V1.13.0
Code Generation Settings :
STM32Cube Firmware Library Package : Copy only the necessary library files
Generate peripheral initialization as a pair of '.c/.h' files per peripheral : No
Backup previously generated files when re-generating : No
Delete previously generated files when not re-generated : Yes
Set all free pins as analog (to optimize the power consumption) : No
Toolchains Settings :
Compiler Optimizations :
then,generate code for SW4STM32.
At SW4STM32 ,convert C to C++.
What's the duplicate question?
I'm sorry.I closed the question because I made a mistake with almost the same content. However, the other is waiting for moderation and can not see it.
I tried to edit this question and reopen it because the other question had disappeared but I could not get enough points.