LoginSignup
0
0

More than 1 year has passed since last update.

STM32L010のシリアルでHello Worldと出力

Last updated at Posted at 2021-05-04

目的
動きそうだから動かしてみた
容量不足でほぼ何もできなかった。

x mbedのリビジョンは、125

ソフトウェアシリアルもあるよ
STM32L010のソフトウェアシリアルでHello Worldと出力 9600bps TX PA2

STM32L010のソフトウェアシリアルで文字を受信する STM32 RX 9600bps

忙しい人よう


#include "mbed.h"

//Serial pc(USBTX, USBRX); // tx, rx
//Serial pc(SERIAL_TX, SERIAL_RX); //767
Serial pc(PA_2, PA_3); //010

int main() {

    char *ss1; //文字のポインター
    int ii; //ループカウンター

    //無限ループ
    while(1) {

        ss1="Hello World !\r\n";
        ii=0; //ループカウンター
        while(ss1[ii]!=0){
            
            //一文字出力
            pc.putc(ss1[ii]);ii++;
                        
        } //while

        //1秒の待ち
        wait_ms(1000);
        
    } //while
} //main

//容量削減
void error(const char* format, ...){}


serial_test_010.jpg

serial_test_010_2.jpg

serial_test_010_2_3.jpg

serial_test_010_2_4.jpg

serial_test_010_2_5.jpg

serial_test_p1_1.jpg

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0