Skip to main content
Phanirajkiran M
Senior
April 2, 2018
Question

RF switching on STM32L4XX

  • April 2, 2018
  • 12 replies
  • 2341 views
Posted on April 02, 2018 at 08:01

Hi 

I want to communicate between two STM32L4 MCU, and interfaced RF on to UARTs.

UART1 -- BLE

UART2 -- XBEE

I want to make a transparent, i mean when there is NO BLE there should be a switch to XBee and the other MCU has to be altered to make a seam less communication. When there is enough RSSI for BLE, XBEE and BLE both has to communicate simultaneously in run time.

My queries : 

a. Does the above scenario can happen in run time?

b. If i make a switch in run time will be there any effect on RFs.

I would like to know a better approach to make a RF switch at run time.

Thanks

Phani 

#rssi #xbee #hal-uart #rf #ble
This topic has been closed for replies.

12 replies

Andrew Neil
Super User
April 2, 2018
Posted on April 02, 2018 at 13:21

Presumably, you are using an external module for BLE, and 

an external module for XBEE?

So you need to study the documentation for those modules to see how to 'activate' and 'de-activate' each one.

a. Does the above scenario can happen in run time?

Yes.

b. If i make a switch in run time will be there any effect on RFs.

You will have to follow the documented procedures for each one regarding connection. disconnection, etc, ...

I would like to know a better approach to make a RF switch at run time.

It's not an RF switch - it's just a choice of which module to use.

Again, you need to 

study the 

documentation

for each module to determine what indication(s) they provide as to whether their link is 'good' or 'usable' or not.
A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
T J
Senior III
April 2, 2018
Posted on April 02, 2018 at 14:36

did you see this chip ? STM32WB

is that similar to your needs ?

https://community.st.com/0D50X00009XkVu3SAF

Andrew Neil
Super User
April 2, 2018
Posted on April 02, 2018 at 14:51

Depends what OP meant by 'XBEE'.

XBEE it is a whole product range from Digi - not a single product, and not a single radio protocol:

https://www.digi.com/xbee

 
A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Phanirajkiran M
Senior
April 2, 2018
Posted on April 02, 2018 at 15:05

HI Team,

My idea is to make RF interface on UART 1 and UART 2 on STM32L4. 

And write a on the fly RF switching firmware( Transparent switch so that the other communicating node has the update on the data sending channel).

Is there any sample/ example which gives a basis to start understanding/ write the firmware.

 Thanks

Phanirajkiran

Tesla DeLorean
Guru
April 2, 2018
Posted on April 02, 2018 at 15:21

>>Is there any sample/ example which gives a basis to start understanding/ write the firmware.

What part of the problem?

Programming the UART? Programming the modules? Porting assorted code to the STM32 platform? Merging of the functionality?

These would seem to be basic software development tasks.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Phanirajkiran M
Senior
April 2, 2018
Posted on April 02, 2018 at 15:30

Hi Clive,

Thanks for the quick reply.

Issue is how to make a Radio Scheduler which is the key component of the dynamic multi-protocol switching, which can take the Data into it depending on the Switch between RF which are running on UARTs. 

Thanks,

Phani

Andrew Neil
Super User
April 2, 2018
Posted on April 02, 2018 at 15:38

As with any project, the key is to start with a high-level understanding, and then break things down into implementable blocks.

You haven't confirmed whether you're using an external module for the BLE, and you haven't answered which particular XBee you're using.

To get a general idea, you could look at how things like phones handle switching their network connection between cellular and  WiFi ...

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Phanirajkiran M
Senior
April 2, 2018
Posted on April 02, 2018 at 15:57

Hi Neil,

Thanks for reply. 

To start this assignment the idea behind is same concept '

phones handle switching their network connection between cellular and  WiFi

'.

We want to do this same concept on Firmware STM32, inorder to it we have choosen RF on UART. 

a. external module for the BLE -- YES, HM10.

b. XBEE module - Digi XBEE module which is interfaced on UART.

Thanks

Phani

Andrew Neil
Super User
April 2, 2018
Posted on April 02, 2018 at 16:13

Phanirajkiran M wrote:

this assignment

Note that the assignment is given to you - therefore you need to be the one doing the research, study, investigation, design, etc.

The Your primary source for assistance should be your teachers or tutors.

We can help where you have specific questions - but theforum is not a place to get your homework done for you!

Phanirajkiran M wrote:

Digi XBEE module

As explained, that is meaningless!

Digi has a

/external-link.jspa?url=https%3A%2F%2Fwww.digi.com%2Fxbee

- so which one, exactly, are you using?

What protocol does it implement?

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Phanirajkiran M
Senior
April 2, 2018
Posted on April 02, 2018 at 16:20

0690X00000604U6QAI.jpg

Does this above algo suits the RF switch.

Thanks

Phani

Andrew Neil
Super User
April 2, 2018
Posted on April 02, 2018 at 16:33

So you're not going to bother actually answering the XBee question, then?

But, from your diagram, I guess it must be a WiFi module?

Your flowchart doesn't really make much sense.

Anyhow, there isn't a straightforward, direct relationship between RSSI and distance.

I would suggest that you experiment with each radio separately, and understand each one's behaviour as the link fails, and as it becomes viable again.

You can't just transmit & receive - you will have to establish a 'connection'.

What will you do when neither path is available?

Note that both ends of the link need to be coordinated to know which radio to use

(this is easier with phones, because it's all IP - but that is not your case here).
A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.