Hi,
I am using your code “test_les.c” configured as SPI reading. I have a module connected to a RPI and I know there is a connection between them. It seems to be working, but quite regularly it does hangs. For a 10 or 20 seconds where I get no data at all.
I looked at the logs, and it mentioning some SPI errors:
lmh: SPI0: Received 3 bytes, in 489 ms OK
dwm_loc_get(&loc)
hal: SPI: Tx 2 bytes: 0x0c00
lmh: SPI0: Rx step 1:
lmh: SPI0: Wait 1 ms…
hal: SPI: Rx 1 bytes: 0x65
lmh: SPISPI0: Rx step 2:
lmh: SPI0: Wait 1 ms…
hal: SPI: Rx 101 bytes: 0x400100410dcb0100007f1500001100000052495104b091d40f000064a8020000c4220000360b00006417512f1a000064c800000000000000960a0000642503851b000064a00a000000000000960a00006434938c11000064bc0c0000c42200002c0b00006
4
lmh: SPI0: Wait 1 ms…
lmh: SPI0: Received 101 bytes, in 2 ms OK
Check Tx&Rx:
OK
ts:1555503624.215854 [459,5503,17,82]
#0)a:0x000091b0[680,8900,2870,100]d=4052,qf=100
#1)a:0x00005117[200,0,2710,100]d=6703,qf=100
#2)a:0x00000325[2720,0,2710,100]d=7045,qf=100
#3)a:0x00009334[3260,8900,2860,100]d=4492,qf=100
dwm_loc_get(&loc)
hal: SPI: Tx 2 bytes: 0x0c00
lmh: SPI0: Rx step 1:
lmh: SPI0: Wait 1 ms…
hal: SPI: Rx 1 bytes: 0x51
lmh: SPISPI0: Rx step 2:
lmh: SPI0: Wait 1 ms…
hal: SPI: Rx 81 bytes: 0x400101410dc40200003e160000b8ffffff52493d03b0918110000064a8020000c4220000360b0000642503af1b000064a00a000000000000960a0000643493a811000064bc0c0000c42200002c0b000064
lmh: SPI0: Wait 1 ms…
lmh: *** ERROR *** HAL_SPI: DWM1001_RV_ERR: 1
Check Tx&Rx:
Fail
dwm_loc_get(&loc)
hal: SPI: Tx 2 bytes: 0x0c00
lmh: SPI0: Rx step 1:
lmh: SPI0: Wait 1 ms…
hal: SPI: Rx 1 bytes: 0x65
lmh: SPISPI0: Rx step 2:
lmh: SPI0: Wait 1 ms…
hal: SPI: Rx 101 bytes: 0x400101410df7020000bb160000f4ffffff51495104b091f80e000064a8020000c4220000360b00006434938311000064bc0c0000c42200002c0b00006417514b1a000064c800000000000000960a0000642503bd1b000064a00a000000000000960a00006
4
lmh: SPI0: Wait 1 ms…
lmh: *** ERROR *** HAL_SPI: DWM1001_RV_ERR: 1
Check Tx&Rx:
Fail
dwm_loc_get(&loc)
hal: SPI: Tx 2 bytes: 0x0c00
lmh: SPI0: Rx step 1:
lmh: SPI0: Wait 1 ms…
hal: SPI: Rx 1 bytes: 0x65
lmh: SPISPI0: Rx step 2:
lmh: SPI0: Wait 1 ms…
hal: SPI: Rx 101 bytes: 0x400100410dee020000141700001a00000052495104b0910f0f000064a8020000c4220000360b0000643493ea11000064bc0c0000c42200002c0b0000641751391a000064c800000000000000960a0000642503561b000064a00a000000000000960a00006
4
lmh: SPI0: Wait 1 ms…
lmh: SPI0: Received 101 bytes, in 2 ms OK
Check Tx&Rx:
OK
ts:1555503654.216376 [750,5908,26,82]
#0)a:0x000091b0[680,8900,2870,100]d=3855,qf=100
#1)a:0x00009334[3260,8900,2860,100]d=4586,qf=100
#2)a:0x00005117[200,0,2710,100]d=6713,qf=100
#3)a:0x00000325[2720,0,2710,100]d=6998,qf=100