Skip to main content
NY L.1
Associate
Aug 28, 2021 7:01 AM UTC
Question

Need to know how to add another task in a sequencer.

I am using nucleo-stm32wb55 board, I am working on BLE peripheral and I am working on MEMS interface, I am using STM32 demo code, where OPUS is used to convert the PDM to PCM . I modified the demo code and added LCD interface and it is working, I am able to write the message like bluetooth connected and blutooth standby mode on my LCD board, I am using ST7789 LCD module, Now I want to display the time using RTC on LCD, I used Systick interrupt, Set a flag, used RTC interrupt, used the RTC_setdate function in infinite loop(above Seq_Run()).

When I tried the above methods, RTC worked, but it is taking 15 seconds to update the value (it should have changed it to 1 second), So I believe the problem is with the sequencer has it is taking time for scheduling MEMS task and bluetooth task, so I want to create another task,so I want to add this RTC code for execution, Please help me how to implement this.

Thank you!

This topic has been closed for replies.

2 replies

ST Employee
Aug 31, 2021 2:20 PM UTC

Hello,

There shall be no other function in the infinite loop while(1) than UTIL_SEQ_Run(). The only use case when adding your own function here may work is when the system keeps running in RUN mode ( i.e: WFI/WFE is never executed)

The correct way to add your own task in the sequencer ( in all cases) is to use :

  • UTIL_SEQ_RegTask() to register your task in the sequencer
  • UTIL_SEQ_SetTask() to notify the sequencer shall execute the registered task

Regards.

NY L.1
NY L.1Author
Associate
Sep 8, 2021 11:42 AM UTC

Thank you for your response, I will check and revert back.