Correct pins for RAK3272s to use built in LoRa Radio

Hi everyone,
I am on a bit of a ride for my bachelor’s thesis, and have embarked on embedded rust. This is not my first project with this, but it is the first using LoRa. Now i got this RAK3272s from my supervisor, and have played around a bit with it, and use the examples from the lora-rs repo. But i can simply not get the radio to transmit anything.
Paste bin of console, where the setup is visible but when i set it up to connect to a LoRaWAN network nothing happens. Now i’ve had it checked right beside a signal analyzer, where you can visibly see that no signal is sent during any of this, so I am sure that it is just not powered or set to transmitting anything.

Here is a pastebin of the source code. I really hope for some help, because this is quite frustrating :smiley:

Welcome to RAK forum @jyyson ,

I haven’t met yet a rust developer here in the forum but we can wait if there are some and will reply on your issue with lora-rs.

As for the radio files, you can have a look on this which is used in our guide for STM32CubeIDE.

Please note that RAK3272 is based on standard RAK3172 which has no TXCO.

Looking on your embassy file, it seems you are enabling it (I am not rust developer but I just saw the TXCO in your code).

Those files I have looked at, and from what I could gather, then the pin PC13 should be set high when transmissiing and low when receiving, and the opposite is the case for the pin PB8, and I just need to be sure that this is correct?

The txco Configuration was just a desperate attempt to see if it has something to do with a misconfiguration of the HW clock on the radio.

Yes correct.

This is the RF path for your reference.

FE_CTRL1 is on PC13

Right thank you very much for the clarification. I’m not really sure why it works now, which is a bit terrifying, but using the MSI(48M) for the sysclk, PC13 for the transmit pin and PB8 for the receive pin it now successfully sends out messages! It can also be that it needed a hard reset from previous configurations, which is what i did just before it working?

I really don’t know much about circuits, so sorry if the terms i’m using are incorrect, I am just reading from my code :sweat_smile:. The circuit you showed above looks blurred out, is that an internal document?

Hi @jyyson ,

Yes. It is an internal document. It will be helpful to share it for you to understand the RF switch.

Btw, is the rust code you have for RAK3172 available for public? Maybe in github? It will be helpful for the Rust IoT community.

Hi @carlrowan, I am happy to say that my examples were added to the examples for the lora-rs repo, which can be seen here.

For these examples i used the MSI. Do you think it is possible to use an HSE, because i can see from the block diagram of the RAK3172 that there is a 32.768k which i am guessing is a crystal oscillator clock? And to use that, what frequency should that be set to, is it really an oscillator or an external clock, and should a prescaler be used?

Hi @jyyson ,

Thank you for sharing the link. I thought it was a personal project. I didn’t know it was for lora-rs itself. Great contribution! :slight_smile:

As for the crystal, you cannot use it for HSE. It is LSE and only for RTC.

All right, I will just keep to MSI then. Thanks a lot for the quick replies!