2018-12-18 04:28 AM
Hi,
I'm trying to get working system using NUCLEO-L053R8 and X-NUCLEO-IKS01A1.
I need to print sensor data on UART and later on I want to use FreeRTOS on that system.
I'm using STM32CubeMX v5.0 to generate initialization code and Atollic TrueSTudio v9.1.0. for development.
Firstly, I've tried to generate code _just for device_ STM32L053R8T6 but then whole integration process looked cumbersome because BSP calls in all examples.
To stay on safe side I've decided to generate code fo NUCLEO-L053R8 board.
I've set pins as in example project "DataLogger" for NUCLEO-L401RE.
For additional software I've selected:
I'm using I2C1 and UART2 which are selected as interfaces for BSP software.
I'm using BSP for IKS01A2 because there is no IKS01A1 with idea that I will manually change files with those from X-CUBE-XT1.
For start, project builds successfully.
I want to use printf() and there are _write() and __io_putchar() retargted. So for next step under main(), between /* USER CODE BEGIN 2 */ I'm using `printf("Hello world!");`
But, nothing happens. There is no output on UART2.
I've noticed that function `int32_t BSP_COM_SelectLogPort(COM_TypeDef COM)` is never called. If I add this call before printf() also nothing happens.
This BSP integration is nightmare. I just don't understand this system enough to tailor it to my needs. I've lost much of time trying to tailor various combinations of example projects and CubeMX generated files, but without working project.
Please, help me how to proceed.
2019-06-04 01:09 AM
Hi Mario,
unfortunately the IKS01A1 is not supported in CubeMX so I'm sorry for that. I suggest you to get IKS01A2 or IKS01A3 that are fully supported in CubeMX. Regarding the issue on printf it is a bit strang because actually printf is widely used in the IKS01A2_DataLogTerminal example. Did you call the printf after the MX_X_CUBE_MEMS1_Init()? It is very important because inside the MX_X_CUBE_MEMS1_Init() we call the BSP_COM_Init() that enables the printf usage.
Best Regards,
Carlo