We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
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
hi, you fail to initialize properly the uart
take a look at this code:
ARM_UART_STATUS status;
status = Driver_UART1.Initialize(NULL, 0);
status = Driver_UART1.PowerControl(ARM_POWER_FULL);
status = Driver_UART1.Configure(9600, 8, ARM_UART_PARITY_NONE,
ARM_UART_STOP_BITS_1,ARM_UART_FLOW_CONTROL_NONE);
if (status != ARM_UART_OK ) {
// something go wrong
Hi,
I had the same problem an this post helped me out. Thanks alot for that. Can you point me to some documentation or code snippets where I can learn how to properly use that UART in RTX?