Wiz-IO / framework-sam-lora

framework-sam-lora Microchip Atmel SAMR3x
7 stars 6 forks source link

Board reset when transmitting LoRa Message #3

Closed novvere closed 4 years ago

novvere commented 4 years ago

Changes band to EU868. Compiled and uploaded firmware to board. The board always reboot when trying to send a LoRa message, just after writing 0x83 value in 0x01 radio module register. This is the bug information generated:

RF Write ADDR: 1 DATA: 83 RXSINGLE SAMR34 Arduino 2019 Georgi Angelov Reset!!!

Wiz-IO commented 4 years ago

The Reset are a consequence of the watchdog ( enable by default ) Some "bug" make "loop forever"...

Wiz-IO commented 4 years ago

appdata

novvere commented 4 years ago

I see it resets always after waiting for TxDone.

//Wait for TxDone
  while(digitalRead(RFM_pins.DIO0) == LOW);

But no message arrives to any of the gateways. Any way to disable watchdog to test?

Wiz-IO commented 4 years ago

comment https://github.com/Wiz-IO/framework-sam-lora/blob/master/arduino/variants/samr34xpro/system.c#L34

novvere commented 4 years ago

It always hangs when waiting RFM_pins.DIO0 to be HIGH. But at least you are been able to send a message. I don't.

Wiz-IO commented 4 years ago

yep :) your TCXO_PWR_PIN is_PORTB 3 and RF oscilator cannot start ... Microchip XPRO board use PORTA 9 https://github.com/Wiz-IO/framework-sam-lora/blob/master/arduino/variants/samr34xpro/variant.cpp#L111

novvere commented 4 years ago

That's what I was trying to find out, at the beginning I suppose all SAMR34 use the same pinout to communicate MCU with radio module. Now it works, no hangs and I see messages in ttn console, I will try now OTAA and multi channel. Thanks!!!!