Burst Sleep Mode in Embedded C: Cooling & Interrupts

  • Thread starter rama1001
  • Start date
  • Tags
    Mode Sleep
In summary: Alternatively, you could use a timer that ticks at a higher frequency than the device's clock so the delay is translated into a higher frequency.
  • #1
rama1001
132
1
Hi,
I am correcting a Embedded C code which requires Burst sleep mode. This sleep period is purely depend on the user input cool time and this is really to coll the machine. I thought of using Sleep function for this user input time but is it able to respond to other interrupts in this period? or any other idea to make it would be highly appreciated.

Thank you.
 
Technology news on Phys.org
  • #2
If this is embedded code, then the sleep function and interrupt handling are part of the operating system used for the embedded code. Hopefully there is sufficient documentation for the operating system to determine how it handles this situation.

It is common for embedded multi-tasking operating systems to allow a task to pend (wait) for an event that can be set by another task or an interrupt routine. This basic functionality may be extended so that a task can pend on a message queue (normally fifo), where other tasks and/or interrupts can add messages to a message queue.
 
Last edited:
  • #3
rcgldr said:
If this is embedded code, then the sleep function and interrupt handling are part of the operating system used for the embedded code. Hopefully there is sufficient documentation for the operating system to determine how it handles this situation.

It is common for embedded multi-tasking operating systems to allow a task to pend (wait) for an event that can be set by another task or an interrupt routine. This basic functionality may be extended so that a task can pend on a message queue (normally fifo), where other tasks and/or interrupts can add messages to a message queue.

HI,
i have a doubt about wating time(blank time or cool time or zero current) in my system. The current C code was not working without this blank period. Suppose, i would like to produce current for 1500ms and 600ms as cool time. I can stop the transformer until this 600ms period but how can i wait exactly 600ms or how to write a piece of code to make it work? Please give me any suggestions.
 
  • #4
rama1001 said:
The current C code was not working without this blank period. Suppose, i would like to produce current for 1500ms and 600ms as cool time. I can stop the transformer until this 600ms period but how can i wait exactly 600ms or how to write a piece of code to make it work? Please give me any suggestions.
If the device has a timer, and the timer is accurate enough, then use the timer. Otherwise, you may need to code a tight loop and calibrate the loop so it's timing can be programmed to very precise delays. This defeats any interrupt handling or multi-tasking since you'd probably need to do this with interrupts disabled to get the precise timing.
 
  • #5


I would suggest using a low power mode such as the Burst sleep mode for cooling purposes in embedded systems. This mode allows the system to enter a low power state while still being able to respond to interrupts. This can be achieved by setting the appropriate interrupt priorities and ensuring that the system wakes up when an interrupt is received.

Another approach could be to use a timer interrupt to periodically check the user input cool time and enter the sleep mode accordingly. This would ensure that the system is not constantly checking for user input, thus saving power.

It is important to carefully consider the trade-offs between power consumption and responsiveness when implementing sleep modes in embedded systems. By carefully designing the code and selecting appropriate sleep modes, the system can effectively cool down while still being able to handle interrupts and other tasks in a timely manner.

Thank you for considering my suggestions and I wish you success in your code correction.
 

1. What is burst sleep mode?

Burst sleep mode is a power-saving feature in embedded systems that allows the processor to enter a low-power state while still being able to respond to interrupts. This mode is commonly found in microcontrollers and can significantly reduce power consumption in devices that require long periods of inactivity.

2. How does burst sleep mode work?

In burst sleep mode, the processor runs at a low clock frequency and disables unnecessary peripherals to conserve power. However, it stays connected to a low-power clock source and can quickly respond to interrupts when needed. This allows the processor to remain in a low-power state for extended periods without missing any important events.

3. What are the benefits of burst sleep mode?

The main benefit of burst sleep mode is reduced power consumption, which is especially important for battery-operated devices. By using this mode, embedded systems can save energy and extend their battery life without sacrificing performance. Additionally, burst sleep mode can also help reduce heat dissipation and increase the lifespan of the device.

4. How do interrupts work in burst sleep mode?

Interrupts are signals that can temporarily halt the normal execution of a program to handle a specific event. In burst sleep mode, the processor remains connected to a low-power clock source, which allows it to quickly respond to interrupts and handle critical events. Once the interrupt is handled, the processor can go back to its low-power state.

5. How can burst sleep mode be implemented in Embedded C?

To use burst sleep mode in Embedded C, you need to configure the processor's sleep mode settings and set up the interrupts accordingly. This may vary depending on the specific microcontroller and development environment. It is also essential to carefully design the program to ensure that it can handle interrupts and resume normal operations without any issues.

Similar threads

Replies
8
Views
1K
Replies
7
Views
1K
Replies
1
Views
2K
  • Sci-Fi Writing and World Building
Replies
6
Views
638
  • Engineering and Comp Sci Homework Help
Replies
8
Views
1K
  • Programming and Computer Science
Replies
2
Views
2K
  • Programming and Computer Science
Replies
8
Views
5K
  • Biology and Medical
Replies
6
Views
2K
  • Programming and Computer Science
Replies
29
Views
3K
Back
Top