pasobmojo.blogg.se

Blue pill schematic
Blue pill schematic






blue pill schematic
  1. #Blue pill schematic how to#
  2. #Blue pill schematic install#
  3. #Blue pill schematic serial#
  4. #Blue pill schematic driver#

The 2 tasks will run with the same priority so they will have equal execution time.

blue pill schematic blue pill schematic

  • 2 tasks are created and a binary semaphore.
  • the micro controller is initialized using SystemInit(), the clock is set using SystemCoreClockUpdate() & stdout_init() intialize USART1.
  • XSemaphoreTake(xSemaphore,(TickType_t) portMAX_DELAY) * Task is implemented in an infinite loop. */Ĭhar *pcTaskName = (char *) pvParameters Heap available for the idle task to be created. If we do reach here then it is likely that there was insufficient * If all is well we will never reach here as the scheduler will now be * Start the scheduler so our tasks start executing. * make the semaphore token available for the first time */ XTaskCreate( vTask2, "Task 2", configMINIMAL_STACK_SIZE, (void*)pvTask2, 1, NULL ) * Create the other task in exactly the same way. NULL ) /* We are not using the task handle. */ġ, /* This task will run at priority 1. (void*)pvTask1, /* We are not using the task parameter. */ĬonfigMINIMAL_STACK_SIZE, /* Stack depth in words.

    blue pill schematic

    XTaskCreate(vTask1, /* Pointer to the function that implements the task.

    #Blue pill schematic serial#

    * Initialize the serial I/O(console ), making standard output to be send to USART1 */ * This function initializes the MCU clock, PLL will be used to generate Main MCU clock */ * Task parameter to be sent to the task function */Ĭonst char *pvTask1 = "Task1 is running." Ĭonst char *pvTask2 = "Task2 is running." Note: The extension of the file has to be added, the tool doesn't add the extension.

    #Blue pill schematic driver#

    This is a generated file that redirects the output to the USART driver to send it out the pins that we configured earlier. In this configuration pin PA9 will be TX and pin PA10 will be RX.įor redirecting printf() to USART, Keil provides a User Code Template file. #error "Invalid USART1_RX Pin Configuration!" #define RTE_USART1_RX_PORT_ID_DEF 1 // change this macro to 1 #error "Invalid USART1_TX Pin Configuration!" #define RTE_USART1_TX_PORT_ID_DEF 1 // change this macro to 1 #define RTE_USART1 1 // change this macro to 1 Configuration settings for Driver_USART1 in component ::CMSIS Driver:USART USART1 (Universal synchronous asynchronous receiver transmitter) In the RTE_Device.h file, which is found under the Device drop-down icon, search for this lines and change this macros. The first step would be to enable USART1 & set the TX and RX pins. Open it and you should get to the same window as the one in the third slide.

    #Blue pill schematic install#

    Install it like any other Windows application and you should have a shortcut to the application on your Desktop. Click the Submit button and download the install executable. The IDE can be downloaded from this link from where you should click MDK-Arm which will take you to the download page. This is an easy project, in which I will create two tasks and output strings to the USART to test the functionality of the RTOS.

    #Blue pill schematic how to#

    I didn't find on the internet a lot of information on how to setup FreeRTOS on this board so I decided to make a tutorial/project which I hope will help other people to start using this OS on such a small board but with many features. I wanted to run it on my ARM-based board which is a STM32F103C8T6 with an ARM Cortex-M3 processor. Recently I took a course on Udemy about RTOS & learned the features of FreeRTOS.








    Blue pill schematic