This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Question about stm32f103c8

recently i been making a device that fulfill the following requirement using stm32f103c8:

1. Use the STM32F103C8T6 (Blue Pill) development board.
2. Connect to an RGB LED using suitable I/O pins. An RGB LED is a combination of 3 LEDs (red, green,
and blue) in one package. You can produce other colours by combining these three colours.
3. Display the following colour sequence continuously: Red, Yellow, Green, Cyan, Blue and Magenta.
4. Each colour should stay on for TWO (2) seconds.
5. Add a switch, SW1. Press SW1 to immediately change the RGB LED colour sequence to flashing white at
2 Hz. White is produced by turning on all 3 LEDs (red, green, and blue) at the same time. Release SW1 to
immediately resume the interrupted colour sequence.
6. Add a second switch, SW2. Press SW2 to immediately speed up colour sequence and flashing white
operations by a factor of TEN (10) i.e. each colour should stay on for 0.2 seconds (for colour sequence),
and flashing white at 20 Hz. Release SW2 to immediately return to the default speed of colour sequence
and flashing white operations.

the program is written using c language in microvision 4. however, my code keep on getting stuck in the delay function, is there any way to solve it?

0