cancel
Showing results for 
Search instead for 
Did you mean: 

LOW POWER MODE AND SEQUENCER

MANOJ_R
Associate II

I AM TRYING TO GET UART DATA FROM A RS485 SENSOR , I AM DOING THIS INSIDE A SEQUENCER , WHERE I HAVE CREATED A SPECIFIC TASK IN WHICH I AM SENDING THE TX DATA FOR GETTING THE SENSOR VALUES , BUT IN SEQUENCER MY CONTROLLER IS RUNNING IN STOP2 MODE , WHERE MY CONTROLLER NOT DETECTING THE UART RX MESSAGES PROPERLY IN INTERRUPT , I NEED SOLUTION FOR THIS ONE , PLEASE DO CONTACT ME IN MAIL FOR  SOLVING THIS PROBLEM.

WE ARE DEVELOPING A BIG LORA PROJECT ,YOUR SUPPORT COULD HELP US TO DEVELOP A PRODUCT EFFICIENTLY ... 
THANK YOU

4 REPLIES 4
Danish1
Lead II

There might be people who are willing to go "off-forum" to help you (without payment). I am not one of them. Any solution I volunteer that helps you might also help other people; I want to help as many people as possible.

The best approach is for you to increase your understanding of what's going on, and the decisions the microcontroller made that led it to entering STOP2 mode. So you'll need to look through and understand the source code.

When I faced a similar problem, also relating to LORA, I found a useful #define in SubGHz_Phy_PingPong/Core/Inc/sys_conf.h; here's the change that fixed it for me:

@@ -63,7 +63,7 @@ extern "C" {
   * @brief Disable Low Power mode
   * @note  0: LowPowerMode enabled. MCU enters stop2 mode, 1: LowPowerMode disabled. MCU enters sleep mode only
   */
-#define LOW_POWER_DISABLE           0
+#define LOW_POWER_DISABLE           1
 
 /* USER CODE BEGIN EC */

 

I KNOW ABOUT STOP2 MODE NOW,SUPPOSE IF I WANT TO GET THE UART DATA FROM THE SENSOR , THEN HOW COULD I GET THAT? 

 THIS IS THE CODE , THAT I WANT TO WORK WITH SEQUENCER TO TRANSMIT
DATA TO A RS485 SENSOR AND GET AND GET RX DATA IN INTERRUPT ,
HOW COULD I EXECUTE THIS ONE? PLEASE HELP ME BRO 

 

void GetSensorData()

{

UTIL_ADV_TRACE_PreSendHook();

char data[9] = {0X01,0X03,0X00,0X00,0X00,0X03,0X05,0XCB};

HAL_UART_Receive_IT(&huart1 ,RXBuf, 11);

HAL_UART_Transmit_DMA(&huart1,data,8);

UTIL_TIMER_Stop(&SensorDataUpdate);

UTIL_TIMER_SetPeriod(&SensorDataUpdate, GETSENSORDATA);

UTIL_TIMER_Start(&SensorDataUpdate);

}

Hi @MANOJ_R the CAPS LOCK seems to be stuck on your keyboard!

Please use this button to properly post source code:

AndrewNeil_0-1719392708785.png

 

You haven't mentioned what STM32 you're using - does it have a UART which can continue to run while the CPU is in STOP2 ?

Maybe you could use an interrupt to wake on the leading-edge of the Start bit ?