cancel
Showing results for 
Search instead for 
Did you mean: 

STM32WL - SubGHz Library - FSK Mode - Incorrect Receive Buffer

JLowe.2
Associate II

Hi,

I’m using the STM32 SubGHz_Phy library on an STM32WLE5JC on a custom board. I’ve been using the library for proprietary LoRa communications for a while, and it’s all worked seamlessly.

However, I’ve now got an application which requires using the SubGHz_Phy library in FSK mode, and have a really weird problem that I can make no headway on. I’ve simplified my test setup to about the simplest possible case, and the problem is as follows:

I have a ‘remote’ board sending a packet of data every 1 second. A ‘master’ board receives this packet, and does so perfectly provided the master board has not transmitted anything. But from the first transmission by the master board, every subsequent reception by that board returns incorrect data. The RX Complete Callback routine ‘Size’ parameter contains the correct size for the expected incoming message, but the buffer pointer passed to the RX Complete Callback does not point to the correct data….. Instead, it appears to point to the packet that the board has just transmitted. It seems as if the library has passed me the data from the radio’s transmit buffer rather than the receive buffer. A further curiosity is that, in this failed situation, the RX Complete Callback is immediately followed by an RX Error Callback, seemingly due to a CRC error being flagged, even though only one packet has been transmitted.

If I simply change the SubGHz_Phy setup to use my previous LoRa settings instead of FSK, it all works perfectly, which seems to imply it’s not my application code (which is about as simple as I can get it, anyway). It seems to only be an FSK problem.

Can anybody give me any clues about this? The FSK settings have been copied directly from the “SubGHz Ping-Pong” example code in the library, and as I describe above, it all works fine until the ‘master’ board transmits something, only then does it go to worms….

Any help much appreciated! Thanks,

John

 

2 REPLIES 2
IIRHO.1
ST Employee

Hello @JLowe.2 and welcome to ST Community.

I suggest you to:

  • Make sure that the buffers are properly allocated and initialized for FSK mode.
  • Make sure that the library is properly switching between transmit and receive modes.
  • Make sure that there is enough time between transmissions and receptions to avoid any overlap or interference.

I hope this is helpful for you.

Issam

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

JLowe.2
Associate II

Thanks for your reply. However, I'm using the ST SubGHz_Phi Middleware library, which handles all of the buffer allocation etc for me, so I don't have much control over that. However, I am sure that there is no overlap between reception and transmission.....

John