cancel
Showing results for 
Search instead for 
Did you mean: 

S2LP trying to implement AUTO-ACK (STack packet)

TClar.8
Associate II

Hi everyone,

(I am using TrueStudio/St-LinkV2)

I am using the S2LP on a custom board. Everything worked fine (basic transmission, STack packet) until I wanted to use the auto-acknowledgment feature.

Following the procedure (DS, 8.1), I have enabled AUTO-ACK on RX side and enabled ACK request (NACK bit = '0') on TX side.

Here are the results :

  • all packets are correctly received and read on the RX side (I am debugging via UART, so I can confirm that each packet is received) + I also can confirm that the received NACK bit is always '0' and the AUTO-ACK is always enabled at each received packet (confirmed by reading s2lp registers using printf/SWO)
  • but on TX side, the ACK packet is received in 25% of transmissions (TX_DATA_SENT IRQ notification). For the other transmissions, I get a timeout! Timeout is set to 2 seconds, so this should be quite enough ;)

Am I missing something? Does someone have any idea how to debug this?

Thanks in advance,

Tristan

1 REPLY 1
TClar.8
Associate II

Almost resolved : now I can get the ack at each transmission, but to get this, I have to re-transmit the message four times (it is always four re-transmissions), by enabling RE_TX option. What I do not understand is, why we need these 4 re-TX to receive an ack on TX side?

Moreover, on RX side, the same message is received four times. I am deeply convinced that we can get an acknowledgment as soon as we transmit the message on first time.

Monitoring DC current consumption on RX side using a digit multimeter, I can see four spikes (ack) on the graph, so now I am sure that the problem is on TX side...

Does someone have any hint?

Tristan