2022-01-31 10:33 AM
Hello,
I'm trying to use the CSMA feature but got the same problem as here
https://community.st.com/s/question/0D50X0000B28om0SQA/s2lp-trying-to-get-csmaca-working.
I tried to use the S2-LP DK GUI with X-NUCLEO-S2868A2 with NUCLEO-L053R8 to directly configure registers in Registers table (already configure Radio settings through GUI), so you should be able to reproduce the same behaviour. I change through the GUI the following registers :
CSMA configuration
addr | Register | Value
0x18 | RSSI_TH | 0x40 (-82 dBm)
0x3A | PROTOCOL1 | CSMA_ON = 0x01
0x4C | CSMA_CONFIG3 | 0xFA
0x4D | CSMA_CONFIG2 | 0x21
0x4E | CSMA_CONFIG1 | BU_PRSC = 0x20
CCA_PERIOD = 0x00 (64xTbit)
0x4F | CSMA_CONFIG0 | CCA_LEN = 0x01
NBACKOFF_MAX = 0x05
GPIO configuration
GPIO0_CONF:GPIO_SELECT = 0x05 (TX state indication)
GPIO1_CONF:GPIO_SELECT = 0x0A (RX state indication)
As described in the datasheet Figure 22 Flowchart of the S2-LP CSMA procedure, I send the Tx command :Low Level Command -> Read/Write Registers -> Send command TX (0x60). I set GPIO_SELECT so using scope I can see S2LP goes to RX state for a very long time (few seconds, but with CCA_period to 0(*64) with 50kbps, it should be 1.5ms approx) unless I set RSSI_TH to a lower value ex -120 dBm, it runs its CSMA/CA FSM, then we can see it listens for 1.5ms
The same happens on my custom board, so the question is
Why S2LP doesn't stop Rx mode the first time if channel is free ?
Thanks.
Solved! Go to Solution.
2022-02-18 03:49 AM
Hello,
I've found, by running the CSMA example project and compare registers with the GUI and open the details of register one by one. CS_BLANKING must be set to 0 for CSMA.
It could be great to add this sentence "Disable it if CSMA is enabled" in 8.3 CSMA/CA engine and in 10 Register contents for the next datasheet revision.
2022-02-14 05:37 AM
I noticed S2LP continues to listen for 1.5ms approx after it detects something, then listen again but don't stop when board1 is sending, listen for 2.7ms and send its packet.
Indeed, in the first image, the change RSSI occurs 1.5ms before it stops listening.
The full configuration of eval board :
00:2A
01:52
02:A2
03:A3
05:62
06:2C
07:83
08:12
09:2F
0A:C2
0C:3F
0D:00
0E:06
0F:23
10:28
11:04
12:06
13:13
14:C8
15:18
16:25
17:E3
18:40
19:80
1A:54
1B:10
1C:22
1D:59
1E:8C
1F:55
20:C0
21:58
2B:80
2C:10
2D:00
2E:00
2F:01
30:30
31:00
32:12
33:88
34:88
35:88
36:88
37:01
38:00
39:40
3A:04
3B:08
3C:40
3D:40
3E:40
3F:40
40:41
41:00
42:00
43:00
44:00
45:00
46:00
47:00
48:01
49:00
4A:01
4B:00
4C:FA
4D:21
4E:04
4F:15
50:00
51:00
52:02
53:00
54:28
5A:15
5B:0C
5C:18
5D:24
5E:30
5F:48
60:60
61:00
62:07
63:01
64:8A
65:D0
68:03
69:88
6A:40
6B:40
6C:45
6D:30
6E:70
6F:4D
75:17
76:9B
77:F4
78:39
79:43
8D:52
8E:01
8F:12
90:00
94:70
95:00
99:00
9A:00
9C:10
9D:00
9E:F9
9F:00
A0:17
A2:28
A4:00
A5:00
A6:00
A7:00
A8:00
A9:00
AA:00
AB:00
EF:00
F0:03
F1:91
2022-02-18 03:49 AM
Hello,
I've found, by running the CSMA example project and compare registers with the GUI and open the details of register one by one. CS_BLANKING must be set to 0 for CSMA.
It could be great to add this sentence "Disable it if CSMA is enabled" in 8.3 CSMA/CA engine and in 10 Register contents for the next datasheet revision.