2023-09-03 10:28 PM
There some limitations/issues with the generation of the LoRaWAN/Target/radio_conf.h
The template radio_conf_h.ftl is hard coding key values in a way that does not preserve user set values.
The following lines are of concern:
It would be useful if these values could be set via the IOC file or, alternatively, be protected from modification in the case of code regeneration.
Noting that the DCDDC_ENABLE value may be redundant as there is an IS_DCDC_SUPPORTED symbol in the radio_board_if.h file.
2023-09-04 12:50 AM
Hello @Andrew Larkin
I share the same opinion about this topic. it will be better to integrate those lines in CubeMX and make them protected.
For now, cube Mx just give as this interface:
hope the next version will give as some more control.
Best regards.
II
2023-09-04 05:04 PM
A work-around to the problem is to add this code to radio_conf.h under the /* USER CODE BEGIN EC */ comment
Only mildly hacky...
/* USER CODE BEGIN EC */
/* Values above for XTAL_DEFAULT_CAP_VALUE and TCXO_CTRL_VOLTAGE are
* not protected from being overwritten by code regeneration, so we
* replace them here where it is safe
*/
#undef XTAL_DEFAULT_CAP_VALUE
#define XTAL_DEFAULT_CAP_VALUE ( 0x10UL )
#undef TCXO_CTRL_VOLTAGE
#define TCXO_CTRL_VOLTAGE TCXO_CTRL_3_0V
/* USER CODE END EC */