Skip to content

Commit 6eda006

Browse files
matthijskooijmanfpistm
authored andcommitted
Revert parts of "Add more debug output"
This reverts commit 7611d5c. Some of this debug output caused problems with RX timing. This reverts the changes to STM32CubeWL, preparing to re-add the non-problematic parts in another commit (to keep the changes made to upstream more contained and easier to track). This also reverts the RFSwitch debug output in the BSP, which was too verbose anyway.
1 parent e09ad67 commit 6eda006

File tree

3 files changed

+0
-43
lines changed

3 files changed

+0
-43
lines changed

src/BSP/radio_board_if.c

-14
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636

3737
/* Includes ------------------------------------------------------------------*/
3838
#include "radio_board_if.h"
39-
#include "mw_log_conf.h"
4039
#include "Arduino.h"
4140

4241
/* Board configuration --------------------------------------------------------*/
@@ -106,22 +105,9 @@ int32_t RBI_DeInit(void)
106105
return 0;
107106
}
108107

109-
static const char *ConfigToString(RBI_Switch_TypeDef Config)
110-
{
111-
switch (Config) {
112-
case RBI_SWITCH_OFF: return "OFF";
113-
case RBI_SWITCH_RX: return "RX";
114-
case RBI_SWITCH_RFO_LP: return "RFO_LP";
115-
case RBI_SWITCH_RFO_HP: return "RFO_HP";
116-
default: return "INVALID";
117-
}
118-
}
119-
120108
int32_t RBI_ConfigRFSwitch(RBI_Switch_TypeDef Config)
121109
{
122-
MW_LOG(TS_OFF, VLEVEL_M, "Configuring RFSwitch for %s\r\n", ConfigToString(Config));
123110
for (unsigned i = 0; i < LORAWAN_RFSWITCH_PIN_COUNT; ++i) {
124-
MW_LOG(TS_OFF, VLEVEL_M, "> Setting pin %u to %u\r\n", lorawan_rfswitch_pins[i], lorawan_rfswitch_values[Config][i]);
125111
digitalWrite(lorawan_rfswitch_pins[i], lorawan_rfswitch_values[Config][i]);
126112
}
127113
return 0;

src/STM32CubeWL/LoRaWAN/Mac/LoRaMac.c

-5
Original file line numberDiff line numberDiff line change
@@ -1070,11 +1070,6 @@ static void ProcessRadioRxDone( void )
10701070
AddressIdentifier_t addrID = UNICAST_DEV_ADDR;
10711071
FCntIdentifier_t fCntID;
10721072

1073-
MW_LOG( TS_ON, VLEVEL_M, "RX: ");
1074-
for (size_t i = 0; i < RxDoneParams.Size; ++i)
1075-
MW_LOG( TS_ON, VLEVEL_M, "%02x", RxDoneParams.Payload[i]);
1076-
MW_LOG( TS_ON, VLEVEL_M, "\r\n");
1077-
10781073
#if ( defined( LORAMAC_VERSION ) && ( LORAMAC_VERSION == 0x01000400 ))
10791074
LoRaMacRadioEvents.Events.RxProcessPending = 0;
10801075
#endif /* LORAMAC_VERSION */

src/STM32CubeWL/SubGHz_Phy/stm32_radio_driver/radio.c

-24
Original file line numberDiff line numberDiff line change
@@ -830,15 +830,6 @@ static void RadioSetRxConfig( RadioModems_t modem, uint32_t bandwidth,
830830
#if (RADIO_SIGFOX_ENABLE == 1)
831831
uint8_t modReg;
832832
#endif
833-
MW_LOG( TS_ON, VLEVEL_M,
834-
"Setting RX Config: modem=%s, bandwidth=%u, datarate=%u, coderate=%u bandwithAfc=%u, preambleLen=%u, symbTimeout=%u, fixLen=%u, payloadLen=%u, crcOn=%u, freqHopOn=%u, hopPeriod=%u, iqInverted=%u, rxContinuous=%u\r\n",
835-
modem == MODEM_FSK ? "MODEM_FSK" : (modem == MODEM_LORA ? "MODEM_LORA" : "?"),
836-
(unsigned)bandwidth, (unsigned)datarate, (unsigned)coderate,
837-
(unsigned)bandwidthAfc, (unsigned)preambleLen,
838-
(unsigned)symbTimeout, (unsigned)fixLen, (unsigned)payloadLen,
839-
(unsigned)crcOn, (unsigned)freqHopOn, (unsigned)hopPeriod,
840-
(unsigned)iqInverted, (unsigned)rxContinuous
841-
);
842833
SubgRf.RxContinuous = rxContinuous;
843834
RFW_DeInit(); /* ST_WORKAROUND: Switch Off FwPacketDecoding by default */
844835
if( rxContinuous == true )
@@ -1021,15 +1012,6 @@ static void RadioSetTxConfig( RadioModems_t modem, int8_t power, uint32_t fdev,
10211012
uint8_t hopPeriod, bool iqInverted, uint32_t timeout )
10221013
{
10231014
RFW_DeInit(); /* ST_WORKAROUND: Switch Off FwPacketDecoding by default */
1024-
MW_LOG( TS_ON, VLEVEL_M,
1025-
"Setting TX Config: modem=%s, power=%u, fdev=%u, bandwidth=%u, datarate=%u, coderate=%u preambleLen=%u, fixLen=%u, crcOn=%u, freqHopOn=%u, hopPeriod=%u, iqInverted=%u, timeout=%u\r\n",
1026-
modem == MODEM_FSK ? "MODEM_FSK" : (modem == MODEM_LORA ? "MODEM_LORA" : "?"),
1027-
(unsigned)power, (unsigned)fdev, (unsigned)bandwidth,
1028-
(unsigned)datarate, (unsigned)coderate, (unsigned)preambleLen,
1029-
(unsigned)fixLen, (unsigned)crcOn, (unsigned)freqHopOn,
1030-
(unsigned)hopPeriod, (unsigned)iqInverted, (unsigned)timeout
1031-
);
1032-
10331015
switch( modem )
10341016
{
10351017
case MODEM_FSK:
@@ -1290,11 +1272,6 @@ static void RadioSend( uint8_t *buffer, uint8_t size )
12901272
IRQ_RADIO_NONE );
12911273
/* ST_WORKAROUND_END */
12921274

1293-
MW_LOG( TS_ON, VLEVEL_M, "TX:");
1294-
for (size_t i = 0; i < size; ++i)
1295-
MW_LOG( TS_ON, VLEVEL_M, " %02x", buffer[i]);
1296-
MW_LOG( TS_ON, VLEVEL_M, "\r\n");
1297-
12981275
/* ST_WORKAROUND_BEGIN : Set the debug pin and update the radio switch */
12991276
/* Set DBG pin */
13001277
DBG_GPIO_RADIO_TX( SET );
@@ -1412,7 +1389,6 @@ static void RadioStandby( void )
14121389

14131390
static void RadioRx( uint32_t timeout )
14141391
{
1415-
MW_LOG( TS_ON, VLEVEL_M, "Starting RX\r\n");
14161392
if( 1UL == RFW_Is_Init( ) )
14171393
{
14181394
RFW_ReceiveInit( );

0 commit comments

Comments
 (0)