cancel
Showing results for 
Search instead for 
Did you mean: 

STM32WL workshop material generates errors with CubeMX

AElgh
Associate III

Hello, I'm practicing the "Point to Point Phy layer application lab" in the "MOOC STM32WL workshop" series.

After downloading the material and opening the project with CubeIDE and building the project, everything is fine.

0693W00000bhVMrQAM.png however, when I try to add a peripheral like the I2C and generate the code, I always get a Board-Spesifications error.

0693W00000bhVPaQAM.png 

For example, The Macro "RF_FREQUENCY_ERROR" was defined before the regeneration of the code.

I tried to delete the redundant files but it still doesn't work. i went around this by defining the peripheral manually and so far it's working, however it would be nicer and faster to have CubeMX working since the project is getting bigger.

Thank you

1 ACCEPTED SOLUTION

Accepted Solutions

Salam, I used the same STM32Cube_FW_WL_V1.3.0 firmware version -> Ping-Pong example.

setting the radio_board_if to User Board (Fig1) and receive the same issue(Fig2).


_legacyfs_online_stmicro_images_0693W00000bhs0EQAQ.png FIG[1]


_legacyfs_online_stmicro_images_0693W00000bhs0nQAA.png FIG[2]

Removing all the Switch-Cases for the Non-LoRa-Modem(GFSK, GMSK) resolve the issue.


_legacyfs_online_stmicro_images_0693W00000bhs1bQAA.png 

I suggest that ST adds a #ifndef for the different Modulation Codes, so only the dedicated code is the only one to be activated.

Thank you

Amir

View solution in original post

7 REPLIES 7
KDJEM.1
ST Employee

Hello @AElgh​ ,

A similar question is asked here:

Please insert your code change between USER CODE BEGIN and USER CODE END to solve this problem.

When your question is answered, please close this topic by choosing Select as Best. This will help other users find that answer faster.

Thank you.

Kaouthar

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.

AElgh
Associate III

Thank you Kauthar for your reply, I already know the "USER CODE BEGIN/END". What I experienced was an issue that I think it's a bug in CubeMX since the I2C Initialization code was not generated the first time but when I DeActivate the I2C then Genrates then ReActivate again, the MX_I2C functions appear in the main.c

Other Errors were removed by Commenting-out the Non-LoRa Sections from the source code (not a professional solution but it works). Lastly, I had to manually copy the BSP Files of the STM32WL Radio to the BSP folder and define the #define USE_BSP_DRIVER.

Thank you

Amir

KDJEM.1
ST Employee

Hi @AElgh​ ,

Thank you for this clarification. Could you please provide more details on the issue:

  • Which STM32CubeMX and STM32CubeIDE versions are you using?
  • Which Cube firmware version are you using?

I made some tests using STM32CubeMX.6.8.0 version and the STM32Cube_FW_WL_V1.3.0 firmware version and I didn't find any issue. For that, try to use the last versions of STM32CubeMx and of STM32Cube firmware.

Please let me know if the problem is solved.

Thank you.

Kaouthar

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.

Hi, I'm using the Firmware provided in the description( From ST) under this MOOC video

MOOC - STM32WL workshop - 4 Point to point Phy layer application lab - YouTube

The application of the sensor point-to-point shall generate this issue. at a later time, I'll make another check on that project and let you know.

Thank you

Amir

Salam, I used the same STM32Cube_FW_WL_V1.3.0 firmware version -> Ping-Pong example.

setting the radio_board_if to User Board (Fig1) and receive the same issue(Fig2).


_legacyfs_online_stmicro_images_0693W00000bhs0EQAQ.png FIG[1]


_legacyfs_online_stmicro_images_0693W00000bhs0nQAA.png FIG[2]

Removing all the Switch-Cases for the Non-LoRa-Modem(GFSK, GMSK) resolve the issue.


_legacyfs_online_stmicro_images_0693W00000bhs1bQAA.png 

I suggest that ST adds a #ifndef for the different Modulation Codes, so only the dedicated code is the only one to be activated.

Thank you

Amir

KDJEM.1
ST Employee

Hi @AElgh​ ,

To solve the problem, please try:

1- To copy the .ioc file from the PingPong example into another folder and generate the code.

2- To build the project.

I hope this help you to solve the problem.

Thank you for your contribution in STCommunity 🙂 .

Kaouthar

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.

Thank you for your reply, unfortunately your suggestion didn't resolve the issue. for now, I'll stick with the deleting un-used-code method until I find a more proper way to do it.

Thank you

Amir