cancel
Showing results for 
Search instead for 
Did you mean: 

Mems studio not identifying my board or connecting to it

tarunprasadoff
Associate

I have an X-NUCLEO-IKS4A1 mounted on top of a NUCLEO-L476RG and I am trying to connect that to Mems Studio. I get one of the two errors in the attached screenshots. Either "Board not identified" or "Some device is already connected".

device_error.pngboard_error.png

12 REPLIES 12
Miroslav BATEK
ST Employee

Hello @Apollo1 

We are checking the generated code for NUCLEO-H503RB and will get back to you shortly.

Miroslav BATEK
ST Employee

Hello @Apollo1 
My colleague analyzed the project and here are his recommendations:

  • No need to select MotionMC&EC libraries if you want to generate IKS4A1_DataLogFusion application, just MotionFX is needed but of course you can keep it there.
  • Circular Mode in DMA settings has to be disabled.
  • I've changed TIM1 to TIM3.
  • I've changed USART2 to USART3.
  • I've increased Minimum Stack Size to 0x4000.
  • Now the project generates correctly and works with MEMS Studio, you can try the attached ioc.
  • You can find settings description for devices supporting Linked-List in chapter 4.3.2 of User Manual for X-CUBE-MEMS1 v12.0.0. We do not set LINKEDLIST section in CubeMX for our projects, you can compare your project to "X-CUBE-MEMS1_v12.0.0"\Firmware\Projects\NUCLEO-U575ZI-Q\Applications\IKS4A1\DataLogFusion\ for details.

Hi Miroslav,

I was able to generate the code, build and program the board using the H503RB_MEMS_App_ST.ioc file you provided. MEMS-Studio was able to connect to the board successfully.

 

I have tried updating my version of the ioc file in Cube-MX and I wanted to add some comments based on your feedback and point to some issues I experienced in the process.

  • I've changed TIM1 to TIM3.

TIM1 does work, however, I think TIM1 should be allocated for more complex setup such as Half-H bridge implementation (BLDC or Digital Power Supply).
TIM3 is a basic general purpose timer.


  • I've changed USART2 to USART3.

On MB1814 project schematic for NUCLEO-503RB, UART over USB (Virtual Com Port) signals VCP_RX and VCP_TX are mapped to pin PA3 and PA4 which belong to USART3.

Within Cube-MX, pin assignment for signals VCP_RX and VCP_TX can be found under "Bsp" section when "Human Machine Interface" with VCOM is checked. Though VCOM has to remain "Unchecked" as it can't be used in the X-CUBE-MEMS1 USART "Found Solutions".

 


  • I've increased Minimum Stack Size to 0x4000.

Using default "Minimum Stack Size" of 0x400 will cause a HardFault.
The HardFault condition can only be seen when running STM32Cube_IDE in debug mode.
So best to avoid using MEMS-Studio "Firmware Programming" to flash the board until it has been shown that MEMS-Studio has been able to connect.

 


  • Circular Mode in DMA settings has to be disabled.
  • Now the project generates correctly and works with MEMS Studio, you can try the attached ioc.
  • You can find settings description for devices supporting Linked-List in chapter 4.3.2 of User Manual for X-CUBE-MEMS1 v12.0.0. We do not set LINKEDLIST section in CubeMX for our projects, you can compare your project to "X-CUBE-MEMS1_v12.0.0"\Firmware\Projects\NUCLEO-U575ZI-Q\Applications\IKS4A1\DataLogFusion\ for details.

I did follow up on the documentation but I may have overlooked or misinterpreted the "Circular Mode" setting.
Having "Circular Mode" set to "Enable" will cause the following error during the build:

error: 'NodeConfig' undeclared (first use in this function)
666 | NodeConfig.NodeType = DMA_GPDMA_LINEAR_NODE;
| ^~~~~~~~~~


On a side note, if "Visibility (Static)" for the Timer is "checked" (under "Project Manager" => "Advanced Settings"), the following error will be reported:

undefined reference to `MX_TIM3_Init'

Once all the above steps have been taken care of, then I can successfully build the code and connect with MEMS_Studio.

PS. In STM32Cube_IDE, the build will fail with the default project settings returning the following error:

../arm-none-eabi/bin/ld.exe: H503RB_MEMS_App.elf section `.text' will not fit in region `FLASH'
../arm-none-eabi/bin/ld.exe: region `FLASH' overflowed by 5880 bytes

Changing the project "Optimization level" to "Optimize for size ..." does fix the issue.

 

When using a NUCLEO MCU board, the add-on sensor expension board (ie. IKS4A1) isn't required to successfully establish a connection. Though trying to acquired sensor data will fail.

 

Thank you.