Modifying library for the WSSFM10 Sigfox module for compatibility with STM32L476RG

All about boards manufactured by ST
luka.banfi
Posts: 10
Joined: Fri Dec 11, 2020 3:09 pm

Re: Modifying library for the WSSFM10 Sigfox module for compatibility with STM32L476RG

Post by luka.banfi »

fpiSTM wrote: Mon Jan 04, 2021 8:56 am Hi,
on Nucleo L476RG D0 and D1 are not connected by default:
D0D1L476RG.png

SB 62/63 are opened by default as PA2 and PA3 are used by the STLink.
So that's the reason it didn't work before?
User avatar
fpiSTM
Posts: 1738
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: Modifying library for the WSSFM10 Sigfox module for compatibility with STM32L476RG

Post by fpiSTM »

luka.banfi wrote: Mon Jan 04, 2021 9:19 am
So that's the reason it didn't work before?
Yes if you do not closed the SB and use the D0/D1 connector then it could not work...
paulportohernan
Posts: 10
Joined: Sun Dec 20, 2020 4:32 pm
Answers: 1

Re: Modifying library for the WSSFM10 Sigfox module for compatibility with STM32L476RG

Post by paulportohernan »

luka.banfi wrote: Mon Jan 04, 2021 8:32 am
paulportohernan wrote: Sun Jan 03, 2021 9:59 pm you dont get the message on the sigfox backend? are you sure the module its connected to the right Tx and Rx pins? your modules have leds to let you know when its transmitting?
also, you are using the

Code: Select all

 wisol.send_rcv()
funtion, if you dont have a downlink configured use

Code: Select all

wisol.send()
I commented out:

Code: Select all

//String valor_recibido = wisol.SEND_RCV(valor); //aproximandamente esperar 1 minuto    
//Serial.println(valor_recibido);
and uncommented:

Code: Select all

Serial.println(wisol.SEND(valor));
Apparently the module wasn't connected to the right TX and RX pins, because I received no message in the Sigfox backend when TX (BRKWS01) was connected to RX/D0 (PA_3) and RX (BRKWS01) was connected to TX/D1 (PA_2), so I switched it so that TX (BRKWS01) is connected to D2 (PA_10) and RX (BRKWS01) is connected to D6 (PB_10). I received messages: Image
good. its working now : )
paulportohernan
Posts: 10
Joined: Sun Dec 20, 2020 4:32 pm
Answers: 1

Re: Modifying library for the WSSFM10 Sigfox module for compatibility with STM32L476RG

Post by paulportohernan »

i have upload a new example for STM32L476RG to the library in case anyone need this:

Code: Select all

#include <Tinyfox.h>

#define btn   PC13 // boton usuario azul / blue user button
#define RXLED  PA5
#define rstPin PC12


//nucleo-64 STM32L476RG:

//HardwareSerial Serial2(USART2);
HardwareSerial Serial3(USART3);
Tiny<HardwareSerial,HardwareSerial> wisol(&Serial3,&Serial,rstPin,false);

void setup() {
  pinMode(btn,INPUT_PULLUP);
  pinMode(RXLED,OUTPUT);
  
  Serial.begin(115200);
  Serial.println("");
  Serial.println("boot");
  wisol.begin(9600);

  while(!Serial);  //comentar si usará una fuente de energía externa

 Serial.println("-Presione botón PC13-");
}

void loop() {
  
  if(digitalRead(btn)==0){

    digitalWrite(RXLED,LOW);
    Serial.println("Tx");
    wisol.RST();
    
    uint32_t valor =10;
    Serial.println(wisol.SEND(valor));
    
    //String valor_recibido = wisol.SEND_RCV(valor); //aproximandamente esperar 1 minuto    
    //Serial.println(valor_recibido); 
    
    digitalWrite(RXLED,HIGH);
    wisol.SLEEP();
    delay(3000);
    Serial.println("-Presione botón PC13-");
  }
  
}
Post Reply

Return to “STM boards (Discovery, Eval, Nucleo, ...)”