cancel
Showing results for 
Search instead for 
Did you mean: 

UART NOT WORKING IN SEQUENCER UNDER LPM

MANOJ_R
Associate II

I AM USING STM32 WL55JC2 CONTROLLER TO WORK AS A LORA END NODE , I AM WORKING WITH EXCISTING CODE FOR LORA END NODE AND I WANT TO CONFIGURE UART1 , THE CODE IS WORKING UNDER  SEQUENCER OS. SO I AM TRYING TO IMPLEMENT UART1 WITHIN THE SEQUENCER OS , UART1 FUNCTION IS CALLED UNDER THE SEQUENCER OS , THE FUNCTION IS CALLING BY THE SEQUENCER , BUT THE UART IS NOT WORKING , I TRIED WITH DMA AS WELL AS INTERUPT , EVEN THOUGH UART IS NOT WORKING.I NEED SUPPORT PLEASE HELP ME .

1 ACCEPTED SOLUTION

Accepted Solutions
Danish1
Lead II

I think the problem is that the LORA examples aim for extremely low power operation.

As such, they stop the processor clock when it doesn't have any more processing work to do just at this moment (with a programmed wake-up in time for the next transmission or reception).

If you need the processor clock for other things e.g. UART communication, you need to prevent this. I don't remember precisely how I did this, but it is probably along the lines of

  UTIL_LPM_SetStopMode(1 << CFG_LPM_SENS_Id, UTIL_LPM_DISABLE);

 

View solution in original post

4 REPLIES 4
Danish1
Lead II

I think the problem is that the LORA examples aim for extremely low power operation.

As such, they stop the processor clock when it doesn't have any more processing work to do just at this moment (with a programmed wake-up in time for the next transmission or reception).

If you need the processor clock for other things e.g. UART communication, you need to prevent this. I don't remember precisely how I did this, but it is probably along the lines of

  UTIL_LPM_SetStopMode(1 << CFG_LPM_SENS_Id, UTIL_LPM_DISABLE);

 

THIS WORKS FOR TRANSMITTING USING UART, BUT I WANT TO RECIEVE SOME DATAS WITH UART RX INTERRUPT PLEASE PROVIDE A FUNCTION TO EXECUTE UART TRANSMIT AND WAIT FOR RX INTERRUPT DATA TO GET THE DATA FROM UART INTERRUPT AFTER SENDING THIS TX DATA , IT IS A 11 BYTE MESSAGE I AM RECIEVING ...

 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);

}

Andrew Neil
Evangelist III