cancel
Showing results for 
Search instead for 
Did you mean: 

Difference between app_subghz_phy.c and subghz_phy_app.c

pho3nix
Associate III

Hello, I am working with RAK3172 which has STM32WLE5CCU6, from CubeMX I am enabling it's SUBGHZ_Phy functionality. But after code generation I am seeing there are two files "app_subghz_phy" and "subghz_phy_app", what are the differences between these two? Which files needs to be modified if I want to control the radio layer? Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions

OnTxDone, OnRxDone, OnTxTimeout,... are the functions to be executed depending on the values of the State variable. 

The Timers on the stm32_timer.c are based on the RTC.

Best Regards.

STTwo-32

 

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.

View solution in original post

4 REPLIES 4
STTwo-32
ST Employee

Hello @pho3nix 

To control the radio layer on your application, you have to modify the "subghz_phy_app.c" and "subghz_phy_app.h". The "app_subghz_phy.c" is automatically generated when creating a Sub-GHz project.  It includes some initializations and configurations of the utilities that the wireless part may need. it includes also the function that run the sequencer of the project functions.

Best Regards.

STTwo-32

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.

Ok, got it. One follow up question I had in mind, there are some functions like OnTxDone, OnRxDone, OnTxTimeout, OnRxTimeout, these are the callback functions in the app layer right?

 

Also, in the utility folder of the project, there is stm32_timer, what is the clock source for this timer, I couldn't find any proper resource so I am asking here.

OnTxDone, OnRxDone, OnTxTimeout,... are the functions to be executed depending on the values of the State variable. 

The Timers on the stm32_timer.c are based on the RTC.

Best Regards.

STTwo-32

 

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.

Thanks for answering my previous questions, can I create my own radio app layer and control the radio behaviour from there instead of using subghz_phy_app