Lora-net / lora_gateway

Driver/HAL to build a gateway using a concentrator board based on Semtech SX1301 multi-channel modem and SX1257/SX1255 RF transceivers.
Other
924 stars 744 forks source link

CALIBRATION FAILURE (STATUS = 0) #62

Closed wushichuan closed 7 years ago

wushichuan commented 7 years ago

Hi , I enconter some error when I setup the util_tx_test./util_tx_test -r 1257 -f 886.5:

**> ERROR: CALIBRATION FAILURE (STATUS = 0)

WARNING: calibration could not access radio A WARNING: calibration could not access radio B WARNING: problem in calibration of radio A for image rejection WARNING: problem in calibration of radio B for image rejection WARNING: problem in calibration of radio A for TX imbalance**

how can I slove it ?

mcoracin commented 7 years ago

Hi, do you get those errors every time you run the calibration sequence?

wushichuan commented 7 years ago

@mcoracin yes, I get those errors every time,

wushichuan commented 7 years ago

HI, @mcoracin , my host conctrol is mtk7621,

wushichuan commented 7 years ago

@mcoracin I wonder that the calibration sequence is necessary? can I ignore this step ?

mcoracin commented 7 years ago

@wushichuan yes, the calibration sequence is necessary to have good radio performances.

Difficult for me to say what is the problem without having more info about your setup. Which gateway board (SX1301) are you using? How is it connected to the host? Which version of the gateway software are you running?

wushichuan commented 7 years ago

@mcoracin 1.The gateway board called RHFOM301, which contains SX1301 chip and tow 1257 chips.

  1. The spi interface, MOSI, MISO, CLOCK, SELECT, connected ok, the power supply is ok, 3.The gateway version is v4.0.1.

I had write a blog about the hardware detail. more detials click here:
http://blog.csdn.net/wsclinux/article/details/75665008

thank you for your help.

mcoracin commented 7 years ago

@wushichuan , have you run the util_spi_stress program to check that your SPI connection is reliable?

./util_spi_stress -t 4

It should run for hours with no error.

mcoracin commented 7 years ago

@wushichuan also, do you control the RESET pin of the RHFOM301 from your mtk7621?

wushichuan commented 7 years ago

@mcoracin ./util_spi_stress -t 4 output: BURST WRITE: to trans 1024 # chunk 1024 # transferred 1024 BURST WRITE: to trans 2 # chunk 2 # transferred 2 did a 1024-byte R/W on a data buffer with no error the 1024 bytes cut to 2 times send due to my diriver, but the busrt wr and busrt rd checking is ok.

In addition, I had no connected the reset pin, is it neccesary? Maybe it causes the err. I will verify it right now!

mcoracin commented 7 years ago

@wushichuan yes, the reset pin is necessary. If it is not connected, it could explain your issue!

wushichuan commented 7 years ago

@mcoracin I had connected reset pin,and reset it according to the power-up sequence,but it takes no effect,

wushichuan commented 7 years ago

hi @mcoracin ,here is some code from file loragw_reg.c (line 142-143):

    {-1,126,0,0,8,1,1},       /* CHIP_ID */
    {-1,127,0,0,1,0,1},       /* EMERGENCY_FORCE_HOST_CTRL */

the 1301 datasheet indicates the "CHIP_ID" register address is 0x7F (127), but the code indicates the 0x7F (127) address is “ EMERGENCY_FORCE_HOST_CTRL”,they are in conflict. Is it a mistake?

wushichuan commented 7 years ago

hi @mcoracin , I don't konw why some registers can't be found in the sx1301 datasheet, such as
the LGW_MCU_PROM_ADDR, and the code **lgw_reg_w(LGW_MCU_PROM_ADDR, 0);** can not be execute sucessfully, Maybe it causes the errors.

wushichuan commented 7 years ago

the issue had been sloved, it caused by the driver

zyzyzyzzyy commented 7 years ago

@wushichuan I have the same problem as you, can you tell me what caused STATUS = 0? How did you solve the problem?

FlorianMarcon commented 5 years ago

Hey @wushichuan,

Can you explain the solution please ?

kitplummer commented 4 years ago

I get to about here regularly to cause the CALIBRATION ERROR:

Cycle 275 > did a 1024-byte R/W on a data buffer with no error
Cycle 276 > error during the buffer comparison
Written values:
 EB  E5  A5  A7  20  20  3F  5F  7B  6A  CD  C8  DD  D7  7B  86

Power issue perhaps?