Skip to main content
yafisdamda
Associate III
May 19, 2016
Question

STM32 uart communication with Xbee s8

  • May 19, 2016
  • 3 replies
  • 1848 views
Posted on May 19, 2016 at 19:59

Hi all.

My product is based STM32F030 and uses Digi Xbee s8 for wireless communication.

The Xbee module is connected to microcontroller over UART2. I am using STM cube lib for my development. 

I am trying to establish communication between two Xbee devices. The problem is when i operate device in debug mode all the communication takes place very fast, But if i disable debug and try to communicate it takes a significant time. I have absolutely no clue what magic the debugger does but it works.

Can anybody help me with this?

Thanks..!!

#no-hablo-hal #stm32-uart-xbee
This topic has been closed for replies.

3 replies

Tesla DeLorean
Guru
May 19, 2016
Posted on May 20, 2016 at 00:51

The debugger likely alters the timing slightly and may enable additional clocks and dbgmcu settings.

You should review your interactions with the XBee, making sure to deal with any command/response processing when configuring.

There are other ways to debug code than step through it with SWD/JTAG pod.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
yafisdamda
Associate III
May 20, 2016
Posted on May 20, 2016 at 09:30

Thanks for the reply..!!!

Are you suggesting there would be something wrong with my clock settings?

Because the communication happens but there is delay, if i dont run in debug mode.

What part of the code should i look into?

I rechecked the interaction with Xbee and didnt find a problem.

Can there be a problem with peripheral clock settings?

Plz help.

Thanks..!!!

Tesla DeLorean
Guru
May 20, 2016
Posted on May 20, 2016 at 17:27

Are you suggesting there would be something wrong with my clock settings?

You're complaining things aren't working, I'm indicating areas where the debugger distorts reality. I suspect you're not communicating with the XBee the way it expects, whether that is command/response sequencing, flow-control, I don't know. You have all the hardware/software, you'll have to analyze what's going on.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..