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

A question about using CMSIS UART Driver

Hello,

I'm Japanese sorry about my poor English.

I've recently  been working on MDK-ARM with STM32F103.

I'd like to make a UART program by using cmsis uart driver.

I've done the following procedures.

Is their anything procedure I need ?

(1) I've implemented the following component by using "Manage Run-Time Environment".

    UART(API)

    related components by pressing "Resolve" button.

(2) I've added "main.c" file by selecting "Add New Item to Group" menue.

(3) I've confirmed that

      PLL setting on "system_stm32f10x.c" and "stm32fx.h"

      agree with

      my hardware.

(4) I've set the "Clock Configuration" of "RTE_Defice.h" file

     and

     "RTX Kernel Timer Tick Configuration" of "RTX_Conf_CM.c" file.

(5) At this point,

    I confirmed that

   my "LED Blimking program" based on CMSIS RTOS

   was working properly.

(6) I've added the following codes to "main.c" file.

 

    #include "Driver_UART.h"                // ::Drivers:UART

    extern ARM_DRIVER_UART Driver_UART1;

   int main (void) {

     osKernelInitialize ();                    // initialize CMSIS-RTOS

     osKernelStart ();                         // start thread execution

     while( Driver_UART1.Configure(115200, 8, ARM_UART_PARITY_NONE, ARM_UART_STOP_BITS_1, ARM_UART_FLOW_CONTROL_NONE) == ARM_UART_ERROR_BAUDRATE ) { }

      uint8_t ch = 'A';

      Driver_UART1.WriteData (&ch, 1);

   }

Sincerely yours

Nagaoka

0